DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 &c)
 Initializing constructor. More...
 
 Path (const Path &c)
 Copy constructor. More...
 
template<class Iter >
 Path (Iter _begin, Iter _end)
 Assigning constructor. More...
 
 ~Path ()
 Default destructor. More...
 
Pathoperator= (const Path &c)
 Assignment operator from Path object. More...
 
Pathoperator= (const std::string &c)
 Assignment operator from string object. More...
 
Pathappend (const std::string &c)
 Append operation. More...
 
Pathoperator/= (const Path &c)
 Append operation. More...
 
Pathoperator/= (const std::string &c)
 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

DD4hep::Path::Path ( )
inline

Default constructor.

Definition at line 48 of file Path.h.

DD4hep::Path::Path ( const std::string &  c)
inline

Initializing constructor.

Definition at line 50 of file Path.h.

DD4hep::Path::Path ( const Path c)
inline

Copy constructor.

Definition at line 52 of file Path.h.

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

Assigning constructor.

Definition at line 54 of file Path.h.

References s.

DD4hep::Path::~Path ( )
inline

Default destructor.

Definition at line 61 of file Path.h.

Member Function Documentation

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

Append operation.

Definition at line 106 of file Path.cpp.

Referenced by operator/=().

Path Path::file_path ( ) const

The full file path of the object.

Definition at line 220 of file Path.cpp.

Path Path::filename ( ) const

The file name of the path.

Definition at line 209 of file Path.cpp.

Referenced by normalize().

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

String representation of thre Path object.

Definition at line 90 of file Path.h.

Referenced by normalize().

Path Path::normalize ( ) const

Normalize path name.

Definition at line 112 of file Path.cpp.

References filename(), native(), and remove_filename().

Path& DD4hep::Path::operator/= ( const Path c)
inline

Append operation.

Definition at line 75 of file Path.h.

References append().

Path& DD4hep::Path::operator/= ( const std::string &  c)
inline

Append operation.

Definition at line 77 of file Path.h.

References append().

Path& DD4hep::Path::operator= ( const Path c)
inline

Assignment operator from Path object.

Definition at line 63 of file Path.h.

Path& DD4hep::Path::operator= ( const std::string &  c)
inline

Assignment operator from string object.

Definition at line 68 of file Path.h.

Path Path::parent_path ( ) const

Parent's path.

Definition at line 204 of file Path.cpp.

size_t Path::parent_path_end ( ) const

Index of the parent's path end.

Definition at line 183 of file Path.cpp.

Path & Path::remove_filename ( )

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

Definition at line 199 of file Path.cpp.

Referenced by normalize().

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

String representation of thre Path object.

Definition at line 92 of file Path.h.


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