#include <path.h>
Public Types | |
typedef std::list< std::string > | TStringList |
Public Member Functions | |
Path (const std::string &path="") | |
constructs a path object from a string, using the Set method | |
void | Set (const std::string &path) |
Sets the managed path expression. | |
bool | IsAbsolute () const |
returns true if the managed path expression denotes an absoulute path, i.e. | |
const std::string & | Front () const |
returns the first path component | |
void | PopFront () |
returns and removes the first path component | |
const std::string & | Back () const |
returns the last path component | |
void | PopBack () |
returns and removes the last path component | |
bool | IsEmpty () const |
returns true, if no path components remain, i.e. | |
std::string | GetCleanPath (const std::string &sep="/") const |
returns a cleaned path expression, removing superfluous separators | |
Protected Attributes | |
TStringList | mPathComponents |
the list of tokenized path components | |
bool | mIsAbsolute |
indicates an absolute path expression | |
Private Member Functions | |
Path (const Path &obj) | |
Path & | operator= (const Path &obj) |
void | Tokenize (const std::string &path) |
tokenizes the path components |
It is capable of cleaning paths and separating a path into path components.
Definition at line 62 of file path.h.
|
|
|
constructs a path object from a string, using the Set method
Definition at line 28 of file path.cpp. References Set(). Here is the call graph for this function: ![]() |
|
|
|
returns the last path component
Definition at line 91 of file path.cpp. References mPathComponents. Referenced by zeitgeist::CoreContext::Install(). |
|
returns the first path component
Definition at line 80 of file path.cpp. References mPathComponents. Referenced by zeitgeist::Core::GetInternal(), and zeitgeist::CoreContext::Install(). |
|
returns a cleaned path expression, removing superfluous separators
Definition at line 47 of file path.cpp. References mIsAbsolute, and mPathComponents. |
|
returns true if the managed path expression denotes an absoulute path, i.e. has a leading slash Definition at line 70 of file path.cpp. References mIsAbsolute. Referenced by zeitgeist::Core::GetInternal(), and zeitgeist::CoreContext::Install(). |
|
returns true, if no path components remain, i.e. all path components are popped Definition at line 75 of file path.cpp. References mPathComponents. Referenced by zeitgeist::Core::GetInternal(), and zeitgeist::CoreContext::Install(). |
|
|
|
returns and removes the last path component
Definition at line 96 of file path.cpp. References mPathComponents. Referenced by zeitgeist::CoreContext::Install(). |
|
returns and removes the first path component
Definition at line 85 of file path.cpp. References mIsAbsolute, and mPathComponents. Referenced by zeitgeist::Core::GetInternal(), and zeitgeist::CoreContext::Install(). |
|
Sets the managed path expression. The path gets tokenized and can be read element by element using Back(), Front(), PopBack() and PopFront() Definition at line 33 of file path.cpp. References mIsAbsolute, and Tokenize(). Referenced by Path(). Here is the call graph for this function: ![]() |
|
tokenizes the path components
Definition at line 101 of file path.cpp. References mPathComponents. Referenced by Set(). |
|
indicates an absolute path expression
Definition at line 129 of file path.h. Referenced by GetCleanPath(), IsAbsolute(), PopFront(), and Set(). |
|
the list of tokenized path components
Definition at line 126 of file path.h. Referenced by Back(), Front(), GetCleanPath(), IsEmpty(), PopBack(), PopFront(), and Tokenize(). |