DynArray< T, INITIAL_SIZE > Class Template Reference

Public Member Functions

void Clear ()
 
void Push (T t)
 
T * PushArr (int count)
 
Pop ()
 
void PopArr (int count)
 
bool Empty () const
 
T & operator[] (int i)
 
const T & operator[] (int i) const
 
const T & PeekTop () const
 
int Size () const
 
int Capacity () const
 
void SwapRemove (int i)
 
const T * Mem () const
 
T * Mem ()
 

Private Member Functions

 DynArray (const DynArray &)
 
void operator= (const DynArray &)
 
void EnsureCapacity (int cap)
 

Private Attributes

T * _mem
 
_pool [INITIAL_SIZE]
 
int _allocated
 
int _size
 

Detailed Description

template<class T, int INITIAL_SIZE>
class tinyxml2::DynArray< T, INITIAL_SIZE >

Definition at line 198 of file tinyxml2.h.

Constructor & Destructor Documentation

◆ DynArray()

DynArray ( )
inline

Definition at line 201 of file tinyxml2.h.

◆ ~DynArray()

~DynArray ( )
inline

Definition at line 208 of file tinyxml2.h.

Member Function Documentation

◆ Capacity()

int Capacity ( ) const
inline

Definition at line 269 of file tinyxml2.h.

◆ Clear()

void Clear ( )
inline

Definition at line 214 of file tinyxml2.h.

◆ Empty()

bool Empty ( ) const
inline

Definition at line 245 of file tinyxml2.h.

◆ EnsureCapacity()

void EnsureCapacity ( int  cap)
inlineprivate

Definition at line 295 of file tinyxml2.h.

◆ Mem() [1/2]

T * Mem ( )
inline

Definition at line 286 of file tinyxml2.h.

◆ Mem() [2/2]

const T * Mem ( ) const
inline

Definition at line 281 of file tinyxml2.h.

◆ operator[]() [1/2]

T & operator[] ( int  i)
inline

Definition at line 249 of file tinyxml2.h.

◆ operator[]() [2/2]

const T & operator[] ( int  i) const
inline

Definition at line 254 of file tinyxml2.h.

◆ PeekTop()

const T & PeekTop ( ) const
inline

Definition at line 259 of file tinyxml2.h.

◆ Pop()

T Pop ( )
inline

Definition at line 234 of file tinyxml2.h.

◆ PopArr()

void PopArr ( int  count)
inline

Definition at line 240 of file tinyxml2.h.

◆ Push()

void Push ( t)
inline

Definition at line 218 of file tinyxml2.h.

◆ PushArr()

T * PushArr ( int  count)
inline

Definition at line 225 of file tinyxml2.h.

◆ Size()

int Size ( ) const
inline

Definition at line 264 of file tinyxml2.h.

◆ SwapRemove()

void SwapRemove ( int  i)
inline

Definition at line 274 of file tinyxml2.h.

Member Data Documentation

◆ _allocated

int _allocated
private

Definition at line 313 of file tinyxml2.h.

◆ _mem

T* _mem
private

Definition at line 311 of file tinyxml2.h.

◆ _pool

T _pool[INITIAL_SIZE]
private

Definition at line 312 of file tinyxml2.h.

◆ _size

int _size
private

Definition at line 314 of file tinyxml2.h.


The documentation for this class was generated from the following file: