ADTF
|
File Path type. More...
Public Member Functions | |
template<typename... T> | |
cFilepath (T... args) | |
cFilepath (const cFilepath &oFilepath) | |
cFilepath & | operator= (cFilepath &&oFilepath) |
cFilepath & | operator= (const cFilepath &oFilepath) |
![]() | |
cFilename () | |
Constructor that initializes an empty cFilename object. | |
cFilename (const cFilename &oFilename) | |
Constructor that initializes the object with an existing cFilename object. More... | |
cFilename & | operator= (const cFilename &i_oOther) |
Copy assignment operator. More... | |
cFilename (const cString &strString) | |
Constructor that initializes the filename with an existing cString object. More... | |
cFilename (const tChar *pString) | |
Constructor that initializes the filename with a null-terminated string. More... | |
cFilename (char cChar) | |
Constructor that initializes the filename with a single character. More... | |
cFilename (cFilename &&i_oOther) | |
Implements move construction. More... | |
cFilename & | operator= (cFilename &&i_oOther) |
Implements move assignment. More... | |
virtual | ~cFilename () |
Destructor. | |
cFilename & | operator= (tChar cChar) |
assigns a given string More... | |
cFilename & | operator= (const tChar *pString) |
assigns a given string More... | |
cFilename & | operator= (const cString &sString) |
assigns a given string More... | |
cFilename | GetRoot () const |
This function extract the root component of a filename (without double point). More... | |
cFilename | GetPath () const |
This function extract the path of the parent folder and/or the root component of a file/folder. More... | |
cString | GetName () const |
This function extracts the name component of a filename. More... | |
cString | GetNameWithoutExtension () const |
This function extract the name component of a filename. More... | |
cString | GetExtension () const |
This function extract the extension of a filename. More... | |
cString | GetDrive () const |
This function extracts the drive name of a filename (e.g. More... | |
tChar | GetDriveLetter () const |
cFilename & | SetExtension (const cString &strExtension) |
This function changes the extension of a filename. More... | |
cFilename & | AppendTrailingSlash () |
This function appends a trailing slash to the filename if there isn't one, yet. More... | |
cFilename & | RemoveTrailingSlash () |
This function removes a trailing slash from the filename if there is one. More... | |
cFilename & | MakeNativeSlashes () |
This function changes all slashes to OS specific slashes. More... | |
cFilename & | MakeBackwardSlashes () |
This function changes all forward slashes to backslashes. More... | |
cFilename & | MakeForwardSlashes () |
This function changes all backslashes to forward slashes. More... | |
cFilename | CreateRelativePath (const cFilename &strParent) const |
This function creates a relative path for this file regarding the given parent (Only works with native slashes!). More... | |
cFilename | CreateAbsolutePath (const cFilename &strParent) const |
This function creates an absolute path for this file regarding the given parent (Only works with native slashes!). More... | |
tBool | IsRelative () const |
This function checks the filename if it is relative. More... | |
tBool | IsAbsolute () const |
This function checks the filename if it is absolute. More... | |
cFilename & | AppendPath (const cFilename &strPath) |
Append a path string to current string. More... | |
cFilename & | CleanPath () |
This function resolves relative components ("." or "..") within an absolute path. More... | |
tVoid | SplitPath (cStringList &List) const |
Split path into a string list. More... | |
![]() | |
string_base () | |
Constructor that initializes an empty cStringA object. | |
string_base (const _myType &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (_myType &&strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const string_base< T2 > &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const _StorageType &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const tChar &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const tChar *strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const tChar *strValue, tSize szLength) | |
Constructor that initalizes an existing cString object with the spezified string value. More... | |
string_base & | operator= (const _myType &strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base & | operator= (_myType &&strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base & | operator= (const string_base< T2 > &strValue) |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base & | operator= (const _StorageType &strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base & | operator= (const tChar &strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base & | operator= (const tChar *strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
virtual | ~string_base () |
Destructor. | |
iterator | begin () |
Iterator to beginning. | |
iterator | end () |
Iterator to end. | |
reverse_iterator | rbegin () |
Reverse iterator to beginning. | |
reverse_iterator | rend () |
Reverse iterator to end. | |
const_iterator | cbegin () const |
Iterator to beginning. | |
const_iterator | cend () const |
Iterator to end. | |
const_reverse_iterator | crbegin () const |
Reverse iterator to beginning. | |
const_reverse_iterator | crend () const |
Reverse iterator to end. | |
tVoid | Clear () |
Makes this cStringA object an empty string and frees memory as appropriate. | |
_myType & | Set (const _myType &strStringToSet, tSize nLength=InvalidPos) |
Assigns a new value to a cStringA object. More... | |
_myType & | Set (const tChar *pString, tSize nLength=InvalidPos) |
Assigns a new value to a cStringA object. More... | |
_myType & | Set (tChar c, tSize nCount) |
Assigns a new value to a cStringA object. More... | |
tSize | GetLength () const |
This function returns the number of characters in a cStringA object. More... | |
tSize | SetBuffer (tSize szSize) |
Sets or resizes the internal string buffer. More... | |
tSize | GetBufferSize () const |
Get the size of the internal allocated string buffer. More... | |
tChar | GetAt (tSize nIdx) const |
You can think of a cStringA object as an array of characters. More... | |
tVoid | SetAt (tSize nIdx, tChar c) |
The SetAt member function sets a single character at a specified position. More... | |
const tChar & | operator[] (tSize nIdx) const |
array access operator More... | |
tChar & | operator[] (tSize nIdx) |
array access operator More... | |
tBool | IsEmpty () const |
This function checks if the string object is empty. More... | |
tBool | IsNotEmpty () const |
This function checks if the string object is not empty. More... | |
const tChar * | GetPtr () const |
This function returns the current string as an array of characters (c-style) More... | |
tChar * | GetBuffer () |
This function returns the pointer to the data. More... | |
_myType & | Append (const _myType &strString, tSize nLength=InvalidPos) |
This function appends a string to the end of the cStringA object. More... | |
_myType & | Append (tChar c) |
This function appends one character to the end of the cStringA object. More... | |
_myType & | Delete (tSize nPos, tSize nLength=InvalidPos) |
This function deletes a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More... | |
_myType & | Insert (const _myType &strToInsertString, tSize nPos, tSize nLength=InvalidPos) |
This function inserts a string into the cStringA object. More... | |
_myType & | Insert (const tChar *pToInsertString, tSize nPos, tSize nLength=InvalidPos) |
This function inserts a string into the cStringA object. More... | |
tInt | Compare (const _myType &strString, tSize nPos=0, tSize nLength=InvalidPos) const |
This function compares a cStringA object with another string using the generic-text function _tcscmp. More... | |
tInt | Compare (const tChar *strString, tSize nPos=0, tSize nLength=InvalidPos) const |
This function compares a cStringA object with another string using the generic-text function _tcscmp. More... | |
tInt | CompareNoCase (const _myType &strString, tSize nPos=0, tSize nLength=InvalidPos) const |
This function compares a cStringA object with another string using the generic-text function _tcsicmp. More... | |
tBool | IsEqual (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are equal (case sensitive) More... | |
tBool | IsEqualNoCase (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are equal (case insensitive) More... | |
tBool | IsNotEqual (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are not equal (case sensitive) More... | |
tBool | IsNotEqualNoCase (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are not equal (case insensitive) More... | |
tSize | Find (const _myType &strStringToFind, tSize nStart=0, const tBool bNoCase=tFalse) const |
This function searches the cStringA object for the first match of a substring. More... | |
tSize | Find (tChar cToFind, tSize nStart=0) const |
This function searches the cStringA object for the first match of the specified character. More... | |
tSize | RFind (tChar cChar, tSize nStart=0) const |
This function searches the cStringA object for the last match of the specified character. More... | |
tSize | FindToken (const _myType &strTokenList, tSize nStart=0) const |
This function searches a string for the first character that matches any character contained in a token list. More... | |
tSize | FindNotToken (const _myType &strTokenList, tSize nStart=0) const |
This function searches a string for the first character that matches none of the characters contained in a token list. More... | |
tSize | CountString (const _myType &strFind, tSize nStart=0) const |
This counts the occurrences of a given substring in a string. More... | |
tSize | Replace (const _myType &strOld, const _myType &strNew, tBool bReplaceAll=tTrue) |
This function replaces one substring by another. More... | |
tSize | Replace (tChar cOld, tChar cNew, tBool bReplaceAll=tTrue) |
This function replaces one character by another. More... | |
tSize | Filter (tChar cChar) |
This function removes all occurrences of a given character from a string. More... | |
tSize | Filter (const _myType &strCharList) |
This function removes all occurrences of each character given in a token list. More... | |
tBool | StartsWith (const _myType &strStartsWith, const tBool bNoCase=tFalse) const |
This function checks if the string starts with a given prefix. More... | |
tSize | RSplitByToken (const tChar cToken, _myType &strFirst, _myType &strSecond) const |
tSize | SplitByToken (const tChar cToken, _myType &strFirst, _myType &strSecond) const |
tBool | EndsWith (const _myType &strEndsWith, const tBool bNoCase=tFalse) const |
This function checks if the string ends with a given postfix. More... | |
operator const tChar * () const | |
This useful casting operator provides an efficient method to access the null- terminated C string contained in a cStringA object. More... | |
const _myType & | operator+= (const _myType &strString) |
The += concatenation operator joins characters to the end of this string. More... | |
tBool | operator== (const tChar *pString) const |
Checks if a string equals the cStringA object. More... | |
tBool | operator== (const _myType &strString) const |
Checks if a string equals the cStringA object. More... | |
tBool | operator!= (const tChar *pString) const |
Checks if a string does not equal the cStringA object. More... | |
tBool | operator!= (const _myType &strString) const |
Checks if a string not equals the cStringA object. More... | |
tBool | operator< (const tChar *pString) const |
Checks if a string is lexicographically greater than the cStringA object. More... | |
tBool | operator< (const _myType &strString) const |
Checks if a string is lexicographically greater than the cStringA object. More... | |
tBool | operator> (const tChar *pString) const |
Checks if a string is lexicographically smaller than the cStringA object. More... | |
tBool | operator> (const _myType &strString) const |
Checks if a string is lexicographically smaller than the cStringA object. More... | |
tBool | operator<= (const tChar *pString) const |
Checks if a string is lexicographically greater than or equal to the cStringA object. More... | |
tBool | operator<= (const _myType &strString) const |
Checks if a string is lexicographically greater than or equal to the cStringA object. More... | |
tBool | operator>= (const tChar *pString) const |
Checks if a string is lexicographically smaller than or equal to the cStringA object. More... | |
tBool | operator>= (const _myType &strString) const |
Checks if a string is lexicographically smaller than or equal to the cStringA object. More... | |
_myType | SubString (tSize nPos, tSize nLength=InvalidPos) const |
This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More... | |
_myType | Mid (tSize nPos, tSize nLength=InvalidPos) const |
This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More... | |
_myType | Left (tSize nLength) const |
Extracts the first (that is, leftmost) nLength characters from the cStringA object and returns a copy of the extracted substring. More... | |
_myType | Right (tSize nLength) const |
Extracts the last (that is, rightmost) nLength characters from the cStringA object and returns a copy of the extracted substring. More... | |
tVoid | Split (string_list_base< _myType > &lstSplittedResult, tChar cToken) const |
This function splits up a single cStringA object into several parts using a token character. More... | |
tVoid | Split (string_list_base< _myType > &lstSplittedResult, const _myType &strToken) const |
This function splits up a single cStringA object into several parts using a token string. More... | |
tVoid | SplitToken (string_list_base< _myType > &lstList, const _myType &strTokenList) const |
Split string using a token list. More... | |
tVoid | Trim () |
This function removes leading and trailing whitespace characters from a cStringA object. More... | |
tVoid | LeftTrim (tBool bNumTrim=tFalse) |
This function removes leading whitespace characters or leading zero characters from a cStringA object. More... | |
tVoid | RightTrim () |
This function removes trailing whitespace characters from a cStringA object. | |
tVoid | NumTrim () |
This function removes whitespace and redundant zero characters from a cStringA object. More... | |
tVoid | DropQuotes () |
This function removes quotes from a cStringA object. More... | |
tVoid | ToLower () |
This function converts a cStringA object to a lowercase string. More... | |
tVoid | ToUpper () |
This function converts a cStringA object to an uppercase string. More... | |
_myType & | Escape () |
Escape control characters. More... | |
_myType & | Unescape () |
Escape control characters. More... | |
tBool | IsInteger () const |
Check if string content represents an integer value. More... | |
tBool | IsFloat () const |
Check if string content represents a floating point value. More... | |
tBool | IsNumeric () const |
Check if string content represents a numeric value. More... | |
tInt32 | AsInt32 () const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tInt32 &i32Value) const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tUInt32 &ui32Value) const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tInt64 &i64Value) const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tUInt64 &ui64Value) const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tFloat64 &f64Value) const |
This function converts the string to a floating-point value. More... | |
tVoid | ToType (tFloat32 &f32Value) const |
This function converts the string to a floating-point value. More... | |
tVoid | ToType (tBool &bValue) const |
This function converts the string to a boolean value. More... | |
tUInt32 | AsUInt32 () const |
This function converts the string to an integer value. More... | |
tInt64 | AsInt64 () const |
This function converts the string to an integer value. More... | |
tUInt64 | AsUInt64 () const |
This function converts the string to an integer value. More... | |
tFloat64 | AsFloat64 () const |
This function converts the string to a floating-point value. More... | |
tFloat32 | AsFloat32 () const |
This function converts the string to a floating-point value. More... | |
tBool | AsBool () const |
This function converts the string to a boolean value. More... | |
tInt64 | HexToInt64 () const |
This function converts a hexadecimal string representation to an integer value. More... | |
tSize | GetMaxBufferSize () const |
Return maximum size of string buffer. More... | |
tVoid | HexToType (tInt64 &i64Value) const |
This function converts a hexadecimal string representation to an integer value. More... | |
Additional Inherited Members | |
![]() | |
typedef string_base< cStackString > | _myType |
definition my type | |
typedef cStackString | _StorageType |
definition storage type | |
typedef _StorageType::value_type | value_type |
definition of value type | |
typedef _StorageType::iterator | iterator |
short typedefinition for cString iterators | |
typedef _StorageType::const_iterator | const_iterator |
short typedefinition for cString iterators | |
typedef _StorageType::reverse_iterator | reverse_iterator |
short typedefinition for cString reverse iterators | |
typedef _StorageType::const_reverse_iterator | const_reverse_iterator |
short typedefinition for cString reverse iterators | |
![]() | |
static cFilename | JoinPath (const cFilename &strPath1, const cFilename &strPath2) |
This function joins two subpaths (strPath1 and strPath2) to a new one. More... | |
static tBool | IsSlash (tChar c) |
This function checks if a character is a slash. More... | |
![]() | |
static _myType | Repeat (tChar c, tSize nCount) |
Creates a string from a repeated character. More... | |
static _myType | FromType (tInt32 i32Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tUInt32 ui32Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tInt64 i64Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tUInt64 ui64Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tFloat64 f64Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tFloat32 f32Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tBool bValue, const _myType &strFormat=Empty) |
This function creates a new cString object from a boolean value. More... | |
static _myType | Format (const value_type *strFormat,...) |
Write formatted data to a string. More... | |
static _myType | ToStringFromType (T oValue, const _myType &strFormat) |
This function creates a new cString object from a numeric value. More... | |
static _myType & | Copy (_myType &strDestination, const _myType &strSource, tSize szLength=InvalidPos) |
Copies the value of one StringObject to another Stringobject. More... | |
![]() | |
static constexpr const tChar | WINDOWS_SLASH = '\\' |
the windows slash is '\' | |
static constexpr const tChar | UNIX_SLASH = '/' |
the unis slash is '/' | |
static constexpr const tChar *const | WINDOWS_DOUBLE_SLASH = "\\\\" |
the windows slash is "\\\\" | |
static constexpr const tChar *const | UNIX_DOUBLE_SLASH = "//" |
the unis slash is "//" | |
static constexpr const tChar | NATIVE_SLASH = UNIX_SLASH |
the native slash of the system will be defined | |
static constexpr const tChar | ALTERNATIVE_SLASH = WINDOWS_SLASH |
the alternative slash will be defined (is the counterpart of NATIVE_DOUBLE_SLASH) | |
static constexpr const tChar *const | NATIVE_DOUBLE_SLASH = UNIX_DOUBLE_SLASH |
the native double slash of the system will be defined | |
static constexpr const tChar *const | ALTERNATIVE_DOUBLE_SLASH = WINDOWS_DOUBLE_SLASH |
the alternative double slash will be defined (is the counterpart of NATIVE_DOUBLE_SLASH) | |
static const cFilename | Empty |
![]() | |
static const _myType | Empty |
Internally used empty string. | |
static const tSize | InvalidPos |
used to identicate out of range, invalidpos or default length | |
File Path type.
Definition at line 424 of file filename.h.