15 #ifndef DD4HEP_DDCORE_PATH_H
16 #define DD4HEP_DDCORE_PATH_H
45 class Path :
public std::string {
50 Path(
const std::string& c) : std::string(c) { }
54 template <
class Iter>
Path(Iter _begin,Iter _end) {
55 if ( _begin != _end ) {
56 std::string
s(_begin, _end);
57 this->std::string::operator=(s);
64 this->std::string::operator=(c);
69 this->std::string::operator=(c);
90 const std::string&
native()
const {
return *
this; }
92 const char*
string_data()
const {
return this->std::string::c_str(); }
Path(Iter _begin, Iter _end)
Assigning constructor.
Path filename() const
The file name of the path.
Path & operator/=(const Path &c)
Append operation.
static const Path & dot_dot_path()
Path representing "..".
static const Path & dot_path()
Path representing ".".
Path(const Path &c)
Copy constructor.
size_t parent_path_end() const
Index of the parent's path end.
const char * string_data() const
String representation of thre Path object.
Path & append(const std::string &c)
Append operation.
Path parent_path() const
Parent's path.
Path file_path() const
The full file path of the object.
Path(const std::string &c)
Initializing constructor.
Path()
Default constructor.
Path & remove_filename()
Manipulator: remove the file name part. Leaves the parent path.
Path & operator=(const Path &c)
Assignment operator from Path object.
~Path()
Default destructor.
const std::string & native() const
String representation of thre Path object.
Path normalize() const
Normalize path name.
Path & operator=(const std::string &c)
Assignment operator from string object.
Path & operator/=(const std::string &c)
Append operation.