Inheritance diagram for Exponent::Basics::CSystemString:
Stores a string and provides path handling functionality on that string
1.0.1 Fixed bug in the = operator that would turn your string to mush because the string equality was not checking if passed object was this
1.0.2 Added removeLastPathComponent function
1.0.3 Added removeFirstPathComponent function
Definition at line 40 of file CSystemString.hpp.
Exponent::Basics::CSystemString::CSystemString | ( | const char * | string = " " |
) |
Construction
string | The string to store |
Exponent::Basics::CSystemString::CSystemString | ( | const CString & | string | ) |
Construction
string | The string to store |
Exponent::Basics::CSystemString::CSystemString | ( | const CSystemString & | string | ) |
Copy Construction
string | The string to store |
virtual Exponent::Basics::CSystemString::~CSystemString | ( | ) | [virtual] |
Destructor
virtual void Exponent::Basics::CSystemString::appendNewExtension | ( | const CString & | ext, | |
const bool | removeOld = true | |||
) | [virtual] |
Append a new extension
ext | The extension to append. Doesnt require a leading '.' | |
removeOld | If true the old extension (if one exists) is remove, if false new extension is simply appended |
virtual void Exponent::Basics::CSystemString::appendNewExtension | ( | const char * | ext, | |
const bool | removeOld = true | |||
) | [virtual] |
Append a new extension
ext | The extension to append. Doesnt require a leading '.' | |
removeOld | If true the old extension (if one exists) is remove, if false new extension is simply appended |
virtual void Exponent::Basics::CSystemString::appendPath | ( | const CString & | path | ) | [virtual] |
Append a path string - before appending, appends a path seperator
path | The stirng to append to the end of the path |
virtual void Exponent::Basics::CSystemString::appendSystemSeperator | ( | ) | [virtual] |
Append a new system seperator (\ or / depending on OS)
virtual CString Exponent::Basics::CSystemString::getDriveLetter | ( | bool | withDriveSeperators = true |
) | [virtual] |
Get the drive letter of the string (on mac volume name)
withDriveSeperators | If true includes ":\\" (PC) or "/" (Mac), if false doesnt include them |
CString | The drive letter |
virtual CString Exponent::Basics::CSystemString::getFolderPath | ( | ) | [virtual] |
Get the folder part of the path
CString | The folder part of the path. |
virtual long Exponent::Basics::CSystemString::getNumberOfPathComponents | ( | ) | [virtual] |
Get the number of path components
long | The number of path components |
virtual CString* Exponent::Basics::CSystemString::getPathComponent | ( | const long | index | ) | [virtual] |
Get a specific path component
index | The index of the path component |
CString* | The path component. You are responsible for deleting the returned memory |
virtual CString Exponent::Basics::CSystemString::getTheExtension | ( | ) | [virtual] |
Get the extension
CString | The extension, up to you to delete memory returned |
virtual CString Exponent::Basics::CSystemString::getTheFilename | ( | ) | const [virtual] |
Get the filename
CString | The filename, up to you to delete memory returned |
virtual bool Exponent::Basics::CSystemString::hasExtension | ( | const CString & | ext | ) | const [virtual] |
Does the path have this extension
ext | The extension to check for |
bool | True if string has matching extension, false otherwise |
virtual bool Exponent::Basics::CSystemString::hasExtension | ( | const char * | ext | ) | const [virtual] |
Does the path have this extension
ext | The extension to check for |
bool | True if string has matching extension, false otherwise |
virtual bool Exponent::Basics::CSystemString::hasExtension | ( | ) | const [virtual] |
Does the path have an extension
bool | True if path has extension, false otherwise |
virtual bool Exponent::Basics::CSystemString::isFolder | ( | ) | const [virtual] |
Is this a folder
bool | True if path is to a folder, false otherwise |
virtual bool Exponent::Basics::CSystemString::operator! | ( | ) | [virtual] |
Check if the string is empty
bool | True if number of characters is == 0, false otherwise |
virtual bool Exponent::Basics::CSystemString::operator!= | ( | CSystemString & | string | ) | [virtual] |
InEquality operator
string | the string to compare to |
bool | True if strings are inequal, false otherwise |
virtual bool Exponent::Basics::CSystemString::operator!= | ( | const char * | string | ) | [virtual] |
InEquality operator
string | the string to compare to |
bool | True if strings are inequal, false otherwise |
virtual CSystemString& Exponent::Basics::CSystemString::operator+= | ( | const char * | string | ) | [virtual] |
Concatenation operator
string | The string to append to the end of this |
CSystemString& | A reference to this |
Reimplemented from Exponent::Basics::CString.
virtual CSystemString& Exponent::Basics::CSystemString::operator+= | ( | const CString & | string | ) | [virtual] |
Concatenation operator
string | The string to append to the end of this |
CSystemString& | A reference to this |
Reimplemented from Exponent::Basics::CString.
virtual CSystemString& Exponent::Basics::CSystemString::operator= | ( | const char * | string | ) | [virtual] |
Assignment operator
string | The string to copy |
CSystemString& | A reference to this |
Reimplemented from Exponent::Basics::CString.
virtual CSystemString& Exponent::Basics::CSystemString::operator= | ( | const CSystemString & | string | ) | [virtual] |
Assignment operator
string | The string to copy |
CSystemString& | A reference to this |
virtual bool Exponent::Basics::CSystemString::operator== | ( | CSystemString & | string | ) | [virtual] |
Equality operator
string | the string to compare to |
bool | True if strings are equal, false otherwise |
virtual bool Exponent::Basics::CSystemString::operator== | ( | const char * | equals | ) | [virtual] |
Equality operator
equals | the string to compare to |
bool | True if strings are equal, false otherwise |
virtual char Exponent::Basics::CSystemString::operator[] | ( | const long | index | ) | [virtual] |
Subscript operator
index | The index of the character you require |
char | The character at the specified index |
virtual void Exponent::Basics::CSystemString::removeExtension | ( | ) | [virtual] |
Remove the extension from the string
virtual void Exponent::Basics::CSystemString::removeFirstPathComponent | ( | ) | [virtual] |
Remove the first path component
virtual void Exponent::Basics::CSystemString::removeLastPathComponent | ( | ) | [virtual] |
Remove the last path component
virtual void Exponent::Basics::CSystemString::replacePathSeperators | ( | ) | [virtual] |
Replace all path seperators with the correct format for the current OS
virtual void Exponent::Basics::CSystemString::stripFilename | ( | ) | [virtual] |
Strip the filename from the string
const long Exponent::Basics::CSystemString::CSYSTEM_STRING_MAX_PATH = _MAX_PATH [static] |
Maximum path length
Definition at line 53 of file CSystemString.hpp.
const char* Exponent::Basics::CSystemString::CSYSTEM_STRING_SYSTEM_SEPERATOR [static] |
System specific path seperator
Definition at line 52 of file CSystemString.hpp.