DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Member Functions | List of all members
dd4hep::Path Class Reference

Path handling class. More...

#include <Path.h>

Inheritance diagram for dd4hep::Path:

Classes

class  detail
 Helpers. More...
 

Public Member Functions

 Path ()
 Default constructor. More...
 
 Path (const std::string &copy)
 Initializing constructor. More...
 
 Path (std::string &&copy)
 Initializing constructor. More...
 
 Path (const Path &copy)
 Copy constructor. More...
 
 Path (Path &&copy)
 Move constructor. More...
 
template<class Iter >
 Path (Iter _begin, Iter _end)
 Assigning constructor. More...
 
 ~Path ()
 Default destructor. More...
 
Pathoperator= (const Path &copy)
 Assignment operator from Path object. More...
 
Pathoperator= (const std::string &copy)
 Assignment operator from string object. More...
 
Pathoperator= (Path &&copy)
 Move assignment operator from Path object. More...
 
Pathoperator= (std::string &&copy)
 Assignment operator from string object. More...
 
Pathappend (const std::string &copy)
 Append operation. More...
 
Pathoperator/= (const Path &copy)
 Append operation. More...
 
Pathoperator/= (const std::string &copy)
 Append operation. More...
 
Path normalize () const
 Normalize path name. More...
 
Path parent_path () const
 Parent's path. More...
 
Path filename () const
 The file name of the path. More...
 
Path file_path () const
 The full file path of the object. More...
 
Pathremove_filename ()
 Manipulator: remove the file name part. Leaves the parent path. More...
 
const std::string & native () const
 String representation of thre Path object. More...
 
const char * string_data () const
 String representation of thre Path object. More...
 
size_t parent_path_end () const
 Index of the parent's path end. More...
 

Detailed Description

Path handling class.

Normally this could as well be replaced by boost::filesystem::path.

However, the LC folks do not like the additional link-dependency. Hence this small extraction. The main code comes from the boost implementation.

See http://www.boost.org/LICENSE_1_0.txt for the license and the filesystem library home page: http://www.boost.org/libs/filesystem

Author
M.Frank
Version
1.0

Definition at line 45 of file Path.h.

Constructor & Destructor Documentation

◆ Path() [1/6]

dd4hep::Path::Path ( )
inline

Default constructor.

Definition at line 48 of file Path.h.

◆ Path() [2/6]

dd4hep::Path::Path ( const std::string &  copy)
inline

Initializing constructor.

Definition at line 50 of file Path.h.

◆ Path() [3/6]

dd4hep::Path::Path ( std::string &&  copy)
inline

Initializing constructor.

Definition at line 52 of file Path.h.

◆ Path() [4/6]

dd4hep::Path::Path ( const Path copy)
inline

Copy constructor.

Definition at line 54 of file Path.h.

◆ Path() [5/6]

dd4hep::Path::Path ( Path &&  copy)
inline

Move constructor.

Definition at line 56 of file Path.h.

◆ Path() [6/6]

template<class Iter >
dd4hep::Path::Path ( Iter  _begin,
Iter  _end 
)
inline

Assigning constructor.

Definition at line 58 of file Path.h.

◆ ~Path()

dd4hep::Path::~Path ( )
inline

Default destructor.

Definition at line 65 of file Path.h.

Member Function Documentation

◆ append()

Path & Path::append ( const std::string &  copy)

Append operation.

Definition at line 108 of file Path.cpp.

◆ file_path()

Path Path::file_path ( ) const

The full file path of the object.

Definition at line 222 of file Path.cpp.

◆ filename()

Path Path::filename ( ) const

The file name of the path.

Definition at line 211 of file Path.cpp.

◆ native()

const std::string& dd4hep::Path::native ( ) const
inline

String representation of thre Path object.

Definition at line 104 of file Path.h.

◆ normalize()

Path Path::normalize ( ) const

Normalize path name.

Definition at line 114 of file Path.cpp.

◆ operator/=() [1/2]

Path& dd4hep::Path::operator/= ( const Path copy)
inline

Append operation.

Definition at line 89 of file Path.h.

◆ operator/=() [2/2]

Path& dd4hep::Path::operator/= ( const std::string &  copy)
inline

Append operation.

Definition at line 91 of file Path.h.

◆ operator=() [1/4]

Path& dd4hep::Path::operator= ( const Path copy)
inline

Assignment operator from Path object.

Definition at line 67 of file Path.h.

◆ operator=() [2/4]

Path& dd4hep::Path::operator= ( const std::string &  copy)
inline

Assignment operator from string object.

Definition at line 72 of file Path.h.

◆ operator=() [3/4]

Path& dd4hep::Path::operator= ( Path &&  copy)
inline

Move assignment operator from Path object.

Definition at line 77 of file Path.h.

◆ operator=() [4/4]

Path& dd4hep::Path::operator= ( std::string &&  copy)
inline

Assignment operator from string object.

Definition at line 82 of file Path.h.

◆ parent_path()

Path Path::parent_path ( ) const

Parent's path.

Definition at line 206 of file Path.cpp.

◆ parent_path_end()

size_t Path::parent_path_end ( ) const

Index of the parent's path end.

Definition at line 185 of file Path.cpp.

◆ remove_filename()

Path & Path::remove_filename ( )

Manipulator: remove the file name part. Leaves the parent path.

Definition at line 201 of file Path.cpp.

◆ string_data()

const char* dd4hep::Path::string_data ( ) const
inline

String representation of thre Path object.

Definition at line 106 of file Path.h.


The documentation for this class was generated from the following files: