Public Member Functions |
LSE_CALL | CSVectorCrtp (const CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize > &_vcSource) |
const _tType &LSE_CALL | operator[] (LSUINT32 _ui32Index) const |
_tType &LSE_CALL | operator[] (LSUINT32 _ui32Index) |
CSVectorCrtp< _tDerivedType,
_tType, _tDataType,
_uAllocSize > &LSE_CALL | operator= (const CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize > &_vcOther) |
LSVOID LSE_CALL | Reset () |
LSVOID LSE_CALL | ResetNoDealloc () |
LSVOID LSE_CALL | Trash () |
LSBOOL LSE_CALL | Allocate (LSUINT32 _ui32Total) |
_tDataType LSE_CALL | GetAllocated () const |
LSBOOL LSE_CALL | Resize (LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | ResizeOver (LSUINT32 _ui32Total) |
LSBOOL LSE_CALL | Push (const _tType &_tVal) |
LSVOID LSE_CALL | Pop () |
LSVOID LSE_CALL | PopNoDealloc () |
LSBOOL LSE_CALL | Insert (const _tType &_tVal, LSUINT32 _ui32Index) |
LSBOOL LSE_CALL | Append (const _tType *_ptValues, _tDataType _tTotal) |
LSVOID LSE_CALL | Remove (LSUINT32 _ui32Index) |
LSVOID LSE_CALL | RemoveNoDealloc (LSUINT32 _ui32Index) |
LSVOID LSE_CALL | RemoveRange (LSUINT32 _ui32Index, LSUINT32 _ui32Total) |
LSVOID LSE_CALL | RemoveRangeNoDealloc (LSUINT32 _ui32Index, LSUINT32 _ui32Total) |
_tDataType LSE_CALL | Length () const |
LSVOID LSE_CALL | Snap () |
Protected Member Functions |
LSVOID LSE_CALL | Construct (_tDataType _tIndex) |
LSVOID LSE_CALL | Destroy (_tDataType _tIndex) |
Protected Attributes |
_tType * | m_ptData |
_tDataType | m_tLen |
_tDataType | m_tAllocated |
template<typename _tDerivedType, typename _tType, typename _tDataType = LSUINT16, unsigned _uAllocSize = 512UL>
class lstl::CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize >
A basic vector.
Class CSVectorCrtp Description: A basic vector.
template<typename _tDerivedType, typename _tType, typename _tDataType = LSUINT16, unsigned _uAllocSize = 512UL>
LSBOOL LSE_CALL lstl::CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize >::Allocate |
( |
LSUINT32 |
_ui32Total | ) |
[inline] |
Allocate a given number of elements. If the allocation is less than what there already is, items are removed.
- Parameters:
-
_ui32Total | The new number of items to be allocated. |
- Returns:
- Returns false if the memory could not be allocated. In this case, the list is not modified.
Reimplemented in lstl::CVector< _tType, _tDataType, _uAllocSize >, lstl::CVectorPoD< _tType, _tDataType, _uAllocSize >, lstl::CVector< LSTL_PAIR, LSUINT32, 1024UL >, lstl::CVector< _tStringType, LSUINT32, 32UL >, lstl::CVector< _tMappedType, LSUINT16, 1024UL >, lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, and lstl::CVectorPoD< wchar_t, LSUINT32, 32 >.
template<typename _tDerivedType, typename _tType, typename _tDataType = LSUINT16, unsigned _uAllocSize = 512UL>
LSBOOL LSE_CALL lstl::CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize >::Append |
( |
const _tType * |
_ptValues, |
|
|
_tDataType |
_tTotal |
|
) |
| [inline] |
template<typename _tDerivedType, typename _tType, typename _tDataType = LSUINT16, unsigned _uAllocSize = 512UL>
LSBOOL LSE_CALL lstl::CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize >::Insert |
( |
const _tType & |
_tVal, |
|
|
LSUINT32 |
_ui32Index |
|
) |
| [inline] |
Insert an element.
- Parameters:
-
_tVal | The item to insert. |
_ui32Index | The index where the item is to be inserted. |
- Returns:
- Returns false if memory could not be allocated. In this case, the list is not modified.
Reimplemented in lstl::CVector< _tType, _tDataType, _uAllocSize >, lstl::CVector< LSTL_PAIR, LSUINT32, 1024UL >, lstl::CVector< _tStringType, LSUINT32, 32UL >, and lstl::CVector< _tMappedType, LSUINT16, 1024UL >.
template<typename _tDerivedType, typename _tType, typename _tDataType = LSUINT16, unsigned _uAllocSize = 512UL>
LSVOID LSE_CALL lstl::CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize >::RemoveRangeNoDealloc |
( |
LSUINT32 |
_ui32Index, |
|
|
LSUINT32 |
_ui32Total |
|
) |
| [inline] |
Remove elements without reallocating.
- Parameters:
-
_ui32Index | The start index of the items to be removed. |
_ui32Total | The number of items to remove. |
Reimplemented in lstl::CVector< _tType, _tDataType, _uAllocSize >, lstl::CVector< LSTL_PAIR, LSUINT32, 1024UL >, lstl::CVector< _tStringType, LSUINT32, 32UL >, and lstl::CVector< _tMappedType, LSUINT16, 1024UL >.
template<typename _tDerivedType, typename _tType, typename _tDataType = LSUINT16, unsigned _uAllocSize = 512UL>
LSVOID LSE_CALL lstl::CSVectorCrtp< _tDerivedType, _tType, _tDataType, _uAllocSize >::Trash |
( |
| ) |
[inline] |
Trash the list without freeing the memory. Calls destructors on objects and resets without freeing any memory. The memory is assumed to be free by another part of the application. For example, if the memory was allocated to a heap and the heap is to be freed at all once. After calling Trash(), the whole heap could be removed in full without creating a memory leak.
Reimplemented in lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >, lstl::CVector< _tType, _tDataType, _uAllocSize >, lstl::CStringBase< CWString, wchar_t >, lstl::CVector< LSTL_PAIR, LSUINT32, 1024UL >, lstl::CVector< _tStringType, LSUINT32, 32UL >, and lstl::CVector< _tMappedType, LSUINT16, 1024UL >.