|
| | FilePath () |
| | Construct an empty path.
|
| | FilePath (const char *pszText) |
| | Construct a path from text without normalising it.
|
| void | SetFromRoot (const HxStr &name) |
| | Set the path to name under sRoot.
|
| void | Set (const HxStr &path) |
| | Set the path to path verbatim, then normalise it.
|
| void | Normalize () |
| | Lowercase the path, turn backslashes into slashes, and resolve its components.
|
| const HxStr & | RelativeToRoot () const |
| | Express the path relative to sRoot.
|
| void | Print (Dbg &sink) const |
| | Write the path to sink in double quotes.
|
| void | Save (Stream &stream) const |
| | Write the path relative to sRoot, with its terminator, to stream.
|
| void | Load (Stream &stream) |
| | Read a name from stream and set the path to it under sRoot.
|
| | HxStr () |
| | Construct an empty string.
|
| | HxStr (const char *pszText) |
| | Construct a copy of a C string.
|
| | HxStr (const HxStr &other) |
| | Construct a copy of another string.
|
| | HxStr (unsigned nCount, char ch) |
| | Construct a run of one repeated character.
|
| | ~HxStr () |
| HxStr & | operator+= (const HxStr &other) |
| | Append another string.
|
| HxStr & | operator+= (const char *pszText) |
| | Append a C string.
|
| HxStr & | operator+= (char ch) |
| | Append one character.
|
| HxStr & | operator= (const char *pszText) |
| | Replace this string with a copy of a C string.
|
| HxStr & | operator= (const HxStr &other) |
| | Replace this string with a copy of another.
|
| char | operator[] (unsigned i) const |
| | Read one character.
|
| bool | operator!= (const char *pszRight) const |
| | Compare against a C string for inequality.
|
| bool | operator!= (const HxStr &right) const |
| | Compare against another string for inequality.
|
| bool | operator== (const char *pszRight) const |
| | Compare against a C string for equality.
|
| bool | operator== (const HxStr &right) const |
| | Compare against another string for equality.
|
| bool | operator< (const HxStr &right) const |
| | Order against another string.
|
| void | Alloc (unsigned nLen) |
| | Discard the text and reserve a zero-filled buffer.
|
| int | Find (char ch) const |
| | Find the first occurrence of a character.
|
| int | Find (char ch, unsigned nStart) const |
| | Find the first occurrence of a character at or after a position.
|
| int | Find (const char *pszText) const |
| | Find the first occurrence of a substring.
|
| int | ReverseFind (char ch) const |
| | Find the last occurrence of a character.
|
| int | ReverseFindOneOf (const char *pszChars) const |
| | Find the last occurrence of any of a set of characters.
|
| int | Compare (unsigned pos, unsigned len, const char *str) const |
| | Compare a run of this string against a C string.
|
| HxStr | Mid (unsigned pos) const |
| | Extract the text from a position to the end.
|
| HxStr | Mid (unsigned pos, unsigned len) const |
| | Extract a run of text.
|
| HxStr & | Replace (unsigned pos, unsigned len, char ch) |
| | Overwrite one character.
|
| HxStr & | Replace (unsigned pos, unsigned len, const HxStr &other) |
| | Overwrite a run of text with another string.
|
| HxStr & | Clear () |
| | Empty the string in place.
|
| HxStr & | Truncate (unsigned pos) |
| | Shorten the string in place.
|
| HxStr & | Erase (unsigned pos, unsigned len) |
| | Remove a run of text.
|
| HxStr & | Insert (unsigned pos, unsigned nCount, char ch) |
| | Insert a run of one repeated character.
|
| HxStr & | Insert (unsigned pos, const HxStr &other) |
| | Insert another string.
|
| std::ostream & | Print (std::ostream &stream) const |
| | Write this string to a stream.
|
File name that the renderer resolves against a shared root directory.
The class emits no RTTI, and its name is inferred from the later Milo engine, whose FilePath plays the same part. Its routines sit in the Rnd::Tex translation unit and take the address of a string member rather than of a texture: Rnd::Tex's bitmap path and Rnd::Movie::mFilename are the two strings they operate on. A path is stored normalised, in lowercase with forward slashes and with . and .. components resolved, and it is written to a file relative to sRoot so that a saved record does not depend on where the data was installed.
The class adds no data member to HxStr, so a path is laid out exactly as the string it wraps.