Base class for Strings collection. More...
Base class for Strings collection.
Public Member Methods | |
PackedStrings (Int32 *count, Int32 *index, PChar8 data, Int32 CharCapacity, Int32 StringCapacity) | |
Constructor. More... | |
Int32 | GetCount () const |
Gets the count. More... | |
PCChar8 | GetString (Int32 index) const |
Gets a string. More... | |
void | CompleteString (PCChar8 string) |
Add a string or complete the current string added by AppendString to the list. More... | |
void | AppendString (PCChar8 string) |
Append a string to the current string of the list. More... | |
void | Clear () |
Clears the content of the collection. More... | |
bool | HasAvailableCharCapacity (Int32 charCapacity) |
Query if it has available character capacity. More... | |
void | SetMinCharCapacity (Int32 charCapacity) |
Sets a minimum character capacity. More... | |
PChar8 | _RawDataBuffer () |
Gets the raw data buffer. More... | |
Int32 | _RawDataBufferCapacity () |
Gets the raw data buffer capacity. More... | |
Int32 | _RawDataBufferUsedSize () |
Gets the raw data buffer used size. More... | |
void | _RawDataBufferUpdated (Int32 usedSize) |
Raw data buffer updated. More... | |
![]() | |
virtual | ~Strings () |
Destructor. More... | |
PCChar8 | operator[] (Int32 index) const |
Array indexer operator. More... | |
void | CheckCount (Int32 expectedValue) const |
Check count. Raise an exception whenever the count mismatch. More... | |
bool | Contains (const PCChar8 text) const |
Query if this string collection contains the given text. More... | |
Protected Member Functions | |
virtual void | UpdateCharCapacity (Int32 expectedSize, Int32 &newCapacity, PChar8 &newBuffer)=0 |
Update the character capacity. More... | |
virtual void | UpdateStringCapacity (Int32 expectedSize, Int32 &newCapacity, Int32 *&newBuffer)=0 |
Update the mumber of strings capacity. More... | |
PackedStrings | ( | Int32 * | count, |
Int32 * | index, | ||
PChar8 | data, | ||
Int32 | CharCapacity, | ||
Int32 | StringCapacity | ||
) |
Constructor.
count | [in,out] number of strings. |
index | [in,out] Current index. |
data | The data. |
CharCapacity | The total character capacity. |
StringCapacity | The number of strings that can be added. |
PChar8 _RawDataBuffer | ( | ) |
Gets the raw data buffer.
Int32 _RawDataBufferCapacity | ( | ) |
Gets the raw data buffer capacity.
void _RawDataBufferUpdated | ( | Int32 | usedSize | ) |
Raw data buffer updated.
usedSize | Size of the used. |
Must be called after a direct change has been applied to RawData
Int32 _RawDataBufferUsedSize | ( | ) |
Gets the raw data buffer used size.
void AppendString | ( | PCChar8 | string | ) |
Append a string to the current string of the list.
string | String to add. |
void Clear | ( | ) |
Clears the content of the collection.
void CompleteString | ( | PCChar8 | string | ) |
Add a string or complete the current string added by AppendString
to the list.
string | String to add. |
bool HasAvailableCharCapacity | ( | Int32 | charCapacity | ) |
Query if it has available character capacity.
charCapacity | The character capacity expected. |
void SetMinCharCapacity | ( | Int32 | charCapacity | ) |
Sets a minimum character capacity.
charCapacity | The character capacity expected. |
|
protectedpure virtual |
Update the character capacity.
expectedSize | The expected character capacity. |
newCapacity | [in, out] The new character capacity. |
newBuffer | [in, out] The new memory buffer. |
New capacity is not always the same than expectedSize in order to optimize the memory managememt.
Implemented in PackedStringListDynamic, PackedStringListDynamicTcp, PackedStringList< CharCapacity, StringCapacity >, PackedStringList< DataSize, DynamicInvocationClientChannelMemoryDataIndex >, PackedStringList< MaxPersistentDiagnosticTextLength, MaxPersistentDiagnostic >, PackedStringList< 1024, 16 >, PackedStringList< 65536, 1024 >, PackedStringList< 1024, 10 >, and DynamicInvocationSharedMemoryStrings.
|
protectedpure virtual |
Update the mumber of strings capacity.
expectedSize | The expected strings capacity. |
newCapacity | [in, out] The new strings capacity. |
newBuffer | [in, out] The new memory buffer. |
New capacity is not always the same than expectedSize in order to optimize the memory managememt.
Implemented in PackedStringListDynamic, PackedStringList< CharCapacity, StringCapacity >, PackedStringList< DataSize, DynamicInvocationClientChannelMemoryDataIndex >, PackedStringList< MaxPersistentDiagnosticTextLength, MaxPersistentDiagnostic >, PackedStringList< 1024, 16 >, PackedStringList< 65536, 1024 >, PackedStringList< 1024, 10 >, and DynamicInvocationSharedMemoryStrings.