Model Railroad System
2.2.2
|
A Class that portably represents a pathname. More...
#include <PathName.h>
Public Member Functions | |
PathName () | |
Default constructor. More... | |
PathName (const char *p) | |
Constructor, given a plain C string. More... | |
PathName (string p) | |
Constructor, given a STL basic_string. More... | |
PathName (const PathName &other) | |
Copy constructor. More... | |
~PathName () | |
Destructor. More... | |
PathName & | operator= (PathName other) |
Assignment operator, from another pathname. More... | |
PathName & | operator= (string name) |
Assignment operator, from a string. More... | |
bool | operator== (const PathName other) const |
Equality operator. More... | |
bool | operator< (const PathName other) const |
Less than operator. More... | |
bool | operator> (const PathName other) const |
Greater than operator. More... | |
bool | operator<= (const PathName other) const |
Less than or equal operator. More... | |
bool | operator>= (const PathName other) const |
Greater than or equal operator. More... | |
bool | SameDirectory (const PathName other) const |
Are the two pathnames in the same directory? More... | |
string | Tail () const |
Return the last pathname component. More... | |
string | Dirname () const |
Return only the directory name. More... | |
string | Extension () const |
Return only the extension. More... | |
string | FullPath () const |
Return the full pathname. More... | |
stringVector | Split () const |
Return a list of pathname components. More... | |
char | PathSeparator () const |
Return the pathname separater character. More... | |
PathName | operator+ (const PathName other) |
Concatenate pathnames. More... | |
PathName | operator+ (string tail) |
Concatenate a string to the tail of a pathname. More... | |
PathName & | operator+= (const PathName other) |
Append a pathname. More... | |
PathName & | operator+= (string tail) |
Append a string. More... | |
Private Attributes | |
string | pathname |
The pathname string. More... | |
A Class that portably represents a pathname.
This class implements a pathname object in a portable, cross platform way.
|
inline |
Default constructor.
References pathname.
|
inline |
|
inline |
|
inline |
|
inline |
Destructor.
string FCFSupport::PathName::Dirname | ( | ) | const |
Return only the directory name.
Referenced by SameDirectory().
string FCFSupport::PathName::Extension | ( | ) | const |
Return only the extension.
|
inline |
Return the full pathname.
References pathname.
Referenced by FCFSupport::System::CarsFile(), FCFSupport::System::CarTypesFile(), FCFSupport::System::IndustriesFile(), FCFSupport::System::OrdersFile(), FCFSupport::System::OwnersFile(), FCFSupport::System::StatsFile(), FCFSupport::System::SystemFile(), and FCFSupport::System::TrainsFile().
Concatenate pathnames.
other | The other instance. |
PathName FCFSupport::PathName::operator+ | ( | string | tail | ) |
Concatenate a string to the tail of a pathname.
tail | The STL basic_string. |
Append a pathname.
other | The other instance. |
PathName& FCFSupport::PathName::operator+= | ( | string | tail | ) |
Append a string.
tail | The STL basic_string. |
|
inline |
|
inline |
Assignment operator, from another pathname.
other | The other instance. |
References pathname.
|
inline |
|
inline |
|
inline |
|
inline |
char FCFSupport::PathName::PathSeparator | ( | ) | const |
Return the pathname separater character.
|
inline |
Are the two pathnames in the same directory?
other | The other instance. |
References Dirname().
stringVector FCFSupport::PathName::Split | ( | ) | const |
Return a list of pathname components.
string FCFSupport::PathName::Tail | ( | ) | const |
Return the last pathname component.
|
private |
The pathname string.
Referenced by FullPath(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), and PathName().