#include <T2DynamicVector.h>
Definition at line 17 of file T2DynamicVector.h.
◆ T2GenericDynamicVector() [1/2]
T2GenericDynamicVector::T2GenericDynamicVector |
( |
T2Allocator * | a_pAllocator, |
|
|
TINT | a_iInitialSize, |
|
|
TINT | a_iGrowSize, |
|
|
TINT | a_iElementSize ) |
|
inlineprotected |
Definition at line 20 of file T2DynamicVector.h.
21 {
27 }
virtual void * Malloc(size_t size, size_t alignment)=0
T2Allocator * m_pAllocator
◆ T2GenericDynamicVector() [2/2]
T2GenericDynamicVector::T2GenericDynamicVector |
( |
void * | a_poElements, |
|
|
TINT | a_iInitialSize, |
|
|
TINT | a_iNumElements ) |
|
inlineprotected |
◆ Grow()
void T2GenericDynamicVector::Grow |
( |
TINT | a_iNumElements, |
|
|
TINT | a_iElementSize ) |
|
protected |
Definition at line 38 of file T2DynamicVector.cpp.
39{
42
43 if ( curSize < newSize )
44 {
46
47 while ( curSize < newSize )
48 {
50 {
52 }
53 else
54 {
56 }
57 }
58
60 }
61}
void Reallocate(TINT a_iNewSize, TINT a_iElementSize)
◆ Reallocate()
void T2GenericDynamicVector::Reallocate |
( |
TINT | a_iNewSize, |
|
|
TINT | a_iElementSize ) |
|
protected |
Definition at line 12 of file T2DynamicVector.cpp.
13{
15 {
17
18 void* elements =
TNULL;
19
20 if ( 0 < a_iNewSize )
21 {
22 elements =
m_pAllocator->Malloc( a_iNewSize * a_iElementSize );
24 }
25
28
30 {
32 }
33
35 }
36}
TFORCEINLINE const T & Min(const T &a, const T &b)
static void * MemCopy(void *dst, const void *src, TSIZE size)
◆ m_iAllocSize
TINT T2GenericDynamicVector::m_iAllocSize |
|
protected |
◆ m_iGrowSize
TINT T2GenericDynamicVector::m_iGrowSize |
|
protected |
◆ m_iNumElements
TINT T2GenericDynamicVector::m_iNumElements |
|
protected |
◆ m_pAllocator
◆ m_poElements
void* T2GenericDynamicVector::m_poElements |
|
protected |
The documentation for this class was generated from the following files: