|
resonance 1.0.1
|


Go to the source code of this file.
Classes | |
| class | HxStr |
| Heap-allocated NUL-terminated string. More... | |
Functions | |
| HxStr | operator+ (const HxStr &left, const HxStr &right) |
| Concatenate two strings. | |
| HxStr | operator+ (const HxStr &left, const char *pszRight) |
| Concatenate a string and a C string. | |
| HxStr | operator+ (const HxStr &left, char ch) |
| Concatenate a string and one character. | |
| std::ostream & | operator<< (std::ostream &stream, const HxStr &text) |
| Write a string to a stream. | |
Variables | |
| const char * | g_szEmptyString |
| Text an empty HxStr points at, and the substitute for a null buffer. | |
| const unsigned | g_nHxStrNoPosition |
| Sentinel a search returns when it finds nothing. | |
Concatenate two strings.
Every call site inlines the body, so the operator has no address of its own. The body is recovered from that emission rather than invented. A concatenation compiles to a copy construction of the left operand into a temporary, the matching operator+=() on the temporary, and a second copy construction of the result into the destination. 0x0017a79c through 0x0017a7b4 in SaveRemixMCT::ListRemixDir() and 0x00179de8 through 0x00179e08 are the two clearest copies, and the first temporary is released immediately afterwards at each one.
Whether the original wrote a free function or a const member cannot be settled, because a member taking one operand and a free function taking two compile the same way once both are inlined. The free form is used here for the same reason the comparison operators use the member form, which is that one of the two has to be chosen.
| left | The string the result starts with. |
| right | The string appended to it. |
Concatenate a string and a C string.
Recovered on the same evidence as the overload above, from the triple at 0x0017a80c through 0x0017a824 and the one at 0x0038b1d4 through 0x0038b1ec in Rnd::MetScreen::ResolveContainerViews(). The middle call of each triple is the C string operator+=() at 0x0010edb0 rather than the string one at 0x004b7c68, which is what distinguishes this overload from a call site converting its operand first.
| left | The string the result starts with. |
| pszRight | The text appended to it. |
Concatenate a string and one character.
Recovered on the same evidence as the overloads above, from the triple at 0x0043a8b4 through 0x0043a8cc in the TnlPointer constructor, whose middle call is the character operator+=() at 0x004b7d28.
| left | The string the result starts with. |
| ch | The character appended to it. |
| std::ostream & operator<< | ( | std::ostream & | stream, |
| const HxStr & | text ) |
Write a string to a stream.
The buffer is passed to the stream without a null check. An empty string therefore arrives at the stream as a null pointer, or in the PAL build as g_szEmptyString.
| stream | The stream to write to. |
| text | The string to write. |
|
extern |
Text an empty HxStr points at, and the substitute for a null buffer.
In the North American release a string whose mStr is null is the empty representation, and a caller handing that string to an interface taking a plain pointer substitutes this global rather than passing null. Twenty routines across unrelated subsystems read it through the same idiom. The European release points every empty HxStr at this text instead of storing null, and its asserts call the global kNullStr.
|
extern |
Sentinel a search returns when it finds nothing.
The word is all ones and sits one word past the empty string in the same literal pool. Its six readers span unrelated subsystems, including the glyph mesh builder and the PyCXX sequence binding, whose released form returns the standard string's own no-position constant from the member that reads it here.