DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Path.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS system source for the DUNE DAQ project.
3// Fork baseline commit: system-00-00-20 (2020-09-25).
4// Renamed since fork: yes (from system/Path.h to include/okssystem/Path.hpp).
5
6/*
7 * Path.h
8 * Test
9 *
10 * Created by Matthias Wiesmann on 09.02.05.
11 * Copyright 2005 CERN. All rights reserved.
12 *
13 */
14
15#ifndef OKSSYSTEM_PATH_CLASS
16#define OKSSYSTEM_PATH_CLASS
17
18
19#include "okssystem/File.hpp"
20
21namespace OksSystem {
22
29
30 class Path {
31
32protected:
34 void parse_path_list(const std::string &path_list);
35public:
36 static const char PATH_SEPARATOR ;
37 Path();
38 Path(const Path& other);
39 Path(const std::string &path_list) ;
40 operator std::string() const ;
41 void add(const OksSystem::File &dir);
42 OksSystem::File which(const std::string &name) const ;
43 void write_to(std::ostream &stream) const ;
44 std::string to_string() const ;
45 } ; // Path
46} // OksSystem
47
48std::ostream& operator<<(std::ostream& stream, const OksSystem::Path& path);
49
50#endif
std::ostream & operator<<(std::ostream &stream, const OksSystem::Path &path)
Definition Path.cpp:129
Wrapper for file operations.
Definition File.hpp:37
std::vector< OksSystem::File > file_list_t
Definition File.hpp:39
Path list handling mechanism.
Definition Path.hpp:30
void parse_path_list(const std::string &path_list)
parse string containing path
Definition Path.cpp:62
OksSystem::File which(const std::string &name) const
resolve a name in the path
Definition Path.cpp:116
std::string to_string() const
converts path into a string
Definition Path.cpp:104
void add(const OksSystem::File &dir)
add a directory to the path
Definition Path.cpp:53
File::file_list_t m_directories
list of directories
Definition Path.hpp:33
void write_to(std::ostream &stream) const
displays the path in a stream
Definition Path.cpp:87
static const char PATH_SEPARATOR
char used as separator in strings (semi-colon)
Definition Path.hpp:36