#include <CdbPathName.hh>
Public Member Functions | |
| CdbPathName (const char *theStr=0) | |
| The normal & default constructor. | |
| CdbPathName (const std::string &theStr) | |
| Construct an object from a string. | |
| CdbPathName (const CdbPathName &thePath) | |
| The copy constructor. | |
| ~CdbPathName () | |
| The destructor. | |
| CdbPathName & | operator= (const CdbPathName &thePath) |
| The assignment operator. | |
| bool | isValid () const |
| Check if the path has the valid state. | |
| bool | isAbsolute () const |
| Check if the path is an ABSOLUTE one. | |
| bool | isRoot () const |
| Check if the path corresponds to the "root" path. | |
| bool | isComposite () const |
| Check if the path is a COMPOSITE one. | |
| CdbPathName | first () const |
| Get the first element in the path. | |
| CdbPathName | afterFirst () const |
| Get the rest of the path after (excluding) the first element. | |
| CdbPathName | last () const |
| Get the last element in the path. | |
| CdbPathName | beforeLast () const |
| Get the beginning of the path before (excluding) the last element. | |
| std::string | toString () const |
| The explicit conversion. | |
| CdbPathName | operator+ (const CdbPathName &thePath) const |
| Add one path to the other one. | |
| CdbPathName | operator+ (const char *theStr) const |
| Add a C-style string to a path. | |
| CdbPathName | operator+ (const std::string &theStr) const |
| Add a C++ string to a path. | |
| CdbIItr< CdbPathName > * | iterator () const |
| Return an iterator to iterate over the elements of a path. | |
| void | dump (std::ostream &theStream, const std::string &thePrefix="") const |
| Dump the internal state of the object. | |
Static Public Member Functions | |
| const char * | separator () |
| The separator of path elements. | |
| std::string | separatorTerminated (const std::string &theName) |
| Produce a name ending with the folder separator. | |
Friends | |
| class | CdbPathNameItr |
Details to come...
Definition at line 19 of file CdbPathName.hh.
|
|
The normal & default constructor. Loads the path from specified string. This constructor expects a string pointer to be passed as value of the parameter. If this is a null pointer or if it points onto a non-translatable string then the new object will remain in the invalid state.
Definition at line 45 of file CdbPathName.cc. Referenced by afterFirst(), beforeLast(), first(), last(), and operator+(). |
|
|
Construct an object from a string. A non-empty string is expected. Otherwise the object will be put into a non-valid state.
Definition at line 56 of file CdbPathName.cc. |
|
|
The copy constructor.
Definition at line 79 of file CdbPathName.cc. |
|
|
The destructor.
Definition at line 88 of file CdbPathName.cc. |
|
|
Get the rest of the path after (excluding) the first element. More details... Definition at line 137 of file CdbPathName.cc. References CdbPathName(). Referenced by CdbMySQLView::create_folder(), CdbMySQLFolder::create_folder(), CdbRooRoViewR::createFolder(), CdbRooRoFolderR::createFolder(), CdbBdbSViewP::createFolder(), CdbMySQLView::exclude_condition(), CdbMySQLFolder::exclude_condition(), CdbMySQLView::find_condition(), CdbMySQLFolder::find_condition(), CdbMySQLView::find_folder(), CdbMySQLFolder::find_folder(), CdbRooRoFolderR::findCondition(), CdbBdbSFolderP::findCondition(), CdbRooRoViewR::findFolder(), CdbRooRoFolderR::findFolder(), CdbBdbSViewP::findFolder(), CdbBdbSFolderP::findFolder(), CdbMySQLView::include_condition(), CdbMySQLFolder::include_condition(), and main(). |
|
|
Get the beginning of the path before (excluding) the last element. More details... Definition at line 159 of file CdbPathName.cc. References CdbPathName(). Referenced by CdbSQLApiView::configIterator(), CdbRooRoViewR::findCondition(), CdbBdbSViewP::findCondition(), CdbSQLApiView::get(), CdbBdbWView::get(), CdbFolder::instance(), CdbCondition::instance(), main(), CdbRooRoViewR::removeCondition(), CdbBdbSViewP::removeCondition(), CdbRooRoViewR::removeFolder(), and CdbBdbSViewP::removeFolder(). |
|
||||||||||||
|
Dump the internal state of the object.
Definition at line 241 of file CdbPathName.cc. |
|
|
Get the first element in the path. More details... Definition at line 130 of file CdbPathName.cc. References CdbPathName(). Referenced by CdbMySQLFolder::create_folder(), CdbRooRoFolderR::createFolder(), CdbMySQLFolder::exclude_condition(), CdbMySQLFolder::find_condition(), CdbMySQLFolder::find_folder(), CdbRooRoFolderR::findCondition(), CdbBdbSFolderP::findCondition(), CdbRooRoFolderR::findFolder(), CdbBdbSFolderP::findFolder(), CdbMySQLFolder::include_condition(), and main(). |
|
|
|
|
|
|
Return an iterator to iterate over the elements of a path. The iterator will return elements of the path in a form of path objects. Definition at line 235 of file CdbPathName.cc. References CdbPathNameItr. Referenced by main(). |
|
|
Get the last element in the path. More details... Definition at line 152 of file CdbPathName.cc. References CdbPathName(). Referenced by CdbSQLApiView::configIterator(), CdbRooRoViewR::findCondition(), CdbBdbSViewP::findCondition(), CdbSQLApiView::get(), CdbBdbWView::get(), CdbFolder::instance(), CdbCondition::instance(), main(), CdbRooRoViewR::removeCondition(), CdbBdbSViewP::removeCondition(), CdbRooRoViewR::removeFolder(), CdbBdbSViewP::removeFolder(), CdbRooProxyElement::shortName(), CdbProxyElement::shortName(), and CdbBdbProxyElement::shortName(). |
|
|
Add a C++ string to a path.
Definition at line 229 of file CdbPathName.cc. References CdbPathName(), and operator+(). |
|
|
Add a C-style string to a path.
Definition at line 223 of file CdbPathName.cc. References CdbPathName(), and operator+(). |
|
|
Add one path to the other one.
Definition at line 180 of file CdbPathName.cc. References _tokens, CdbPathName(), isAbsolute(), and isValid(). Referenced by operator+(). |
|
|
The assignment operator.
Definition at line 92 of file CdbPathName.cc. References _isAbsolute, _isComposite, _isRoot, _isValid, _name, and _tokens. |
|
|
The separator of path elements. This separator is also used as the name of the "root" path. Definition at line 21 of file CdbPathName.cc. Referenced by CdbMySQLView::create_folder(), CdbMySQLView::exclude_condition(), CdbMySQLView::find_condition(), CdbSQLApiView::findFolder(), CdbRooRoView::findFolder(), CdbBdbWView::findFolder(), CdbBdbSView::findFolder(), CdbSQLFolder::fullPathName(), CdbMySQLView::include_condition(), CdbRooRoFolderR::insert(), main(), CdbRooRoFolderRItr::next(), CdbRooRoConditionAtFolderRItr::next(), CdbBdbSFolderPItr::next(), CdbRooRoFolderR::removeCondition(), CdbRooRoFolderR::removeFolder(), separatorTerminated(), and CdbBdbWFolderItr::value(). |
|
|
Produce a name ending with the folder separator. The method would ensure that the output string produced out of the input one has a path name separator in its end. EXAMPLE: Input Output ------- ------ ** ERROR ** "" ** ERROR ** "/" "/" "abc" "abc/" "efg/" "efg/" "xyz//" "xyz//" The method won't attempt to sqeeze multiple separators as in case of the "xyz//" example shown above into a single one. Also, the input string should not be empty (non-initialized) and its length must be at least 1. IMPORTANT NOTE: If the input string is empty or it has zero characters then the method would crash the application. That's because the method doesn't have a clean way to tell a caller abouta wrong value of the parameter. In the end passing an empty string into this method is most likely a result of either a serious bug in an application's logic, or a sign of a memory corruption. Definition at line 27 of file CdbPathName.cc. References separator(). Referenced by main(). |
|
|
|
Definition at line 21 of file CdbPathName.hh. Referenced by iterator(). |
1.3-rc3