API Guides > ConceptRT 3.x
PackedStringList< CharCapacity, StringCapacity > Class Template Reference

Strings collection. More...

Detailed Description

template<Int32 CharCapacity, Int32 StringCapacity>
class ConceptRT::PackedStringList< CharCapacity, StringCapacity >

Strings collection.

Parameters
CharCapacityTotal amount of chars of all the strings.
StringCapacityNumber of strings indexed in the collection.
+ Inheritance diagram for PackedStringList< CharCapacity, StringCapacity >:

Public Member Methods

 PackedStringList ()
 Default constructor. More...
 
- Public Member Methods inherited from PackedStrings
 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...
 
- Public Member Methods inherited from Strings
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

void UpdateCharCapacity (Int32 expectedSize, Int32 &newCapacity, PChar8 &newBuffer)
 Update the character capacity. More...
 
void UpdateStringCapacity (Int32 expectedSize, Int32 &newCapacity, Int32 *&newBuffer)
 Update the mumber of strings capacity. More...
 

Constructor & Destructor Documentation

Default constructor.

Methods Documentation

void UpdateCharCapacity ( Int32  expectedSize,
Int32 newCapacity,
PChar8 newBuffer 
)
protectedvirtual

Update the character capacity.

Parameters
expectedSizeThe 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.

RT Exceptions:
RT_ERROR_CONTAINER_FULL

Implements PackedStrings.

void UpdateStringCapacity ( Int32  expectedSize,
Int32 newCapacity,
Int32 *&  newBuffer 
)
protectedvirtual

Update the mumber of strings capacity.

Parameters
expectedSizeThe 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.

RT Exceptions:
RT_ERROR_CONTAINER_FULL

Implements PackedStrings.