DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Path.hpp
Go to the documentation of this file.
1/*
2 * Path.h
3 * Test
4 *
5 * Created by Matthias Wiesmann on 09.02.05.
6 * Copyright 2005 CERN. All rights reserved.
7 *
8 */
9
10#ifndef OKSSYSTEM_PATH_CLASS
11#define OKSSYSTEM_PATH_CLASS
12
13
14#include "okssystem/File.hpp"
15
16namespace OksSystem {
17
25 class Path {
26
27protected:
29 void parse_path_list(const std::string &path_list);
30public:
31 static const char PATH_SEPARATOR ;
32 Path();
33 Path(const Path& other);
34 Path(const std::string &path_list) ;
35 operator std::string() const ;
36 void add(const OksSystem::File &dir);
37 OksSystem::File which(const std::string &name) const ;
38 void write_to(std::ostream &stream) const ;
39 std::string to_string() const ;
40 } ; // Path
41} // OksSystem
42
43std::ostream& operator<<(std::ostream& stream, const OksSystem::Path& path);
44
45#endif
std::ostream & operator<<(std::ostream &stream, const OksSystem::Path &path)
Definition Path.cpp:124
Wrapper for file operations.
Definition File.hpp:32
std::vector< OksSystem::File > file_list_t
Definition File.hpp:34
Path list handling mechanism.
Definition Path.hpp:25
void parse_path_list(const std::string &path_list)
parse string containing path
Definition Path.cpp:57
OksSystem::File which(const std::string &name) const
resolve a name in the path
Definition Path.cpp:111
std::string to_string() const
converts path into a string
Definition Path.cpp:99
void add(const OksSystem::File &dir)
add a directory to the path
Definition Path.cpp:48
File::file_list_t m_directories
list of directories
Definition Path.hpp:28
void write_to(std::ostream &stream) const
displays the path in a stream
Definition Path.cpp:82
static const char PATH_SEPARATOR
char used as separator in strings (semi-colon)
Definition Path.hpp:31