#include <T2ObjectPool.h>
Public Member Functions | |
| TSTATICASSERT (MaxNumber >=2) | |
| TSTATICASSERT (sizeof(T) >=sizeof(T2GenericObjectPool::UnusedObject)) | |
| T2ObjectPool () | |
| template<class... Args> | |
| T * | NewObject (Args &&... args) |
| T * | AllocateObject () |
| void | FreeObject (T *a_pObject) |
| void | DeleteObject (T *a_pObject) |
| virtual TSIZE | GetUsedSize () const OVERRIDE |
| virtual TSIZE | GetCapacity () const OVERRIDE |
| virtual TBOOL | IsAddressInPool (const void *a_pAddress) const |
| TBOOL | CanAllocate () const |
Additional Inherited Members | |
Protected Member Functions inherited from T2GenericObjectPool | |
| virtual void * | Malloc (TSIZE a_uiSize, TSIZE a_uiAlignment) OVERRIDE |
| virtual void * | Malloc (TSIZE a_uiSize) OVERRIDE |
| virtual void | Free (void *a_pPtr) OVERRIDE |
| virtual TBOOL | CanAllocate (TSIZE size) const OVERRIDE |
| virtual void * | TryMalloc (TSIZE size, TSIZE alignment) OVERRIDE |
| virtual void * | TryMalloc (TSIZE size) OVERRIDE |
| void | Initialise (UnusedObject *a_pObjects, TUINT a_uiMaxNumber, TUINT a_uiObjectSize) |
| UnusedObject * | GetObject () |
| void | ReturnObject (UnusedObject *a_pObject) |
| TUINT | GetNumFreeObjects () const |
| virtual | ~T2GenericObjectPool ()=default |
Protected Member Functions inherited from T2Allocator | |
| template<class T, class... Args> | |
| T * | New (Args &&... args) |
| template<class T> | |
| void | Delete (T *ptr) |
Protected Attributes inherited from T2GenericObjectPool | |
| UnusedObject * | m_pHead |
Definition at line 99 of file T2ObjectPool.h.
|
inline |
Definition at line 106 of file T2ObjectPool.h.
|
inline |
Definition at line 123 of file T2ObjectPool.h.
|
inline |
Definition at line 158 of file T2ObjectPool.h.
|
inline |
Definition at line 135 of file T2ObjectPool.h.
|
inline |
Definition at line 129 of file T2ObjectPool.h.
|
inlinevirtual |
Implements T2Allocator.
Definition at line 147 of file T2ObjectPool.h.
|
inlinevirtual |
|
inlinevirtual |
Definition at line 152 of file T2ObjectPool.h.
|
inline |
Definition at line 116 of file T2ObjectPool.h.
| T2ObjectPool< T, MaxNumber, ObjectSize, Alignment >::TSTATICASSERT | ( | MaxNumber >= | 2 | ) |
| T2ObjectPool< T, MaxNumber, ObjectSize, Alignment >::TSTATICASSERT | ( | sizeof(T) >=sizeof(T2GenericObjectPool::UnusedObject) | ) |