#include <T2ObjectPool.h>
Definition at line 8 of file T2ObjectPool.h.
◆ ~T2GenericObjectPool()
virtual T2GenericObjectPool::~T2GenericObjectPool |
( |
| ) |
|
|
virtualdefault |
◆ CanAllocate()
virtual TBOOL T2GenericObjectPool::CanAllocate |
( |
TSIZE | size | ) |
const |
|
inlineprotectedvirtual |
◆ Free()
virtual void T2GenericObjectPool::Free |
( |
void * | a_pPtr | ) |
|
|
inlineprotectedvirtual |
Implements T2Allocator.
Definition at line 30 of file T2ObjectPool.h.
31 {
33 }
#define TSTATICCAST(POINTERTYPE, VALUE)
void ReturnObject(UnusedObject *a_pObject)
◆ GetNumFreeObjects()
TUINT T2GenericObjectPool::GetNumFreeObjects |
( |
| ) |
const |
|
inlineprotected |
Definition at line 85 of file T2ObjectPool.h.
86 {
88 for (
auto it =
m_pHead; it !=
TNULL; it = it->pNextObject, uiNumber++ )
89 ;
90
91 return uiNumber;
92 }
◆ GetObject()
◆ Initialise()
Definition at line 56 of file T2ObjectPool.h.
57 {
61
62 for (
TUINT i = a_uiMaxNumber - 1; i != 0; i-- )
63 {
65 pObject->pNextObject = pNext;
66 pObject = pNext;
67 }
68
70 }
#define TREINTERPRETCAST(TYPE, VALUE)
UnusedObject * pNextObject
◆ Malloc() [1/2]
virtual void * T2GenericObjectPool::Malloc |
( |
TSIZE | a_uiSize | ) |
|
|
inlineprotectedvirtual |
◆ Malloc() [2/2]
virtual void * T2GenericObjectPool::Malloc |
( |
TSIZE | a_uiSize, |
|
|
TSIZE | a_uiAlignment ) |
|
inlineprotectedvirtual |
◆ ReturnObject()
void T2GenericObjectPool::ReturnObject |
( |
UnusedObject * | a_pObject | ) |
|
|
inlineprotected |
◆ TryMalloc() [1/2]
virtual void * T2GenericObjectPool::TryMalloc |
( |
TSIZE | size | ) |
|
|
inlineprotectedvirtual |
◆ TryMalloc() [2/2]
virtual void * T2GenericObjectPool::TryMalloc |
( |
TSIZE | size, |
|
|
TSIZE | alignment ) |
|
inlineprotectedvirtual |
◆ m_pHead
The documentation for this class was generated from the following file: