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#include "okssystem/File.hpp"
19
20namespace OksSystem {
21
28
29class Path
30{
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&
49operator<<(std::ostream& stream, const OksSystem::Path& path);
50
51#endif
void operator<<(TraceStreamer &x, const ers::Issue &r)
Definition Logger.hxx:128
Wrapper for file operations.
Definition File.hpp:38
std::vector< OksSystem::File > file_list_t
Definition File.hpp:40
Path list handling mechanism.
Definition Path.hpp:30
void parse_path_list(const std::string &path_list)
parse string containing path
Definition Path.cpp:65
OksSystem::File which(const std::string &name) const
resolve a name in the path
Definition Path.cpp:125
std::string to_string() const
converts path into a string
Definition Path.cpp:111
void add(const OksSystem::File &dir)
add a directory to the path
Definition Path.cpp:55
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:92
static const char PATH_SEPARATOR
char used as separator in strings (semi-colon)
Definition Path.hpp:36