File ObjectPool.h
FileList > engine > include > ObjectPool.h
Go to the source code of this file
#include "IntTypes.h"
Classes
| Type | Name |
|---|---|
| struct | ObjectPoolData 16 byte aligned |
Public Functions
| Type | Name |
|---|---|
| void * | FreeObjectPool (void * pObjectPool) |
| void | FreeObjectPoolIndex (void * pObjectPool, int indexToFree) |
| void * | GetObjectPoolIndex (void * pObjectPool, int * pOutIndex) returns the object pool, possibly resized. returns index of a free space in the pool through pOutIndex |
| void * | InitObjectPool (int objectSize, int poolInitialSize) |
Macros
| Type | Name |
|---|---|
| define | NEW_OBJECT_POOL (a, size) ((a\*)InitObjectPool(sizeof(a),size)) |
| define | OBJECT_POOL (a) a\* |
| define | OBJ_POOL_BOUNDS_CHECK (handle, rVal, pool) /* multi line expression */ |
| define | OBJ_POOL_BOUNDS_CHECK_NO_RETURN (handle, pool) /* multi line expression */ |
| define | ObjectPoolCapacity (pObjectPool) ((((struct [**ObjectPoolData**](structObjectPoolData.md)\*)pObjectPool) - 1)->capacity) |
| define | ObjectPoolFreeArraySize (pObjectPool) (((struct [**ObjectPoolData**](structObjectPoolData.md)\*)pObjectPool) - 1)->freeObjectsArraySize |
Public Functions Documentation
function FreeObjectPool
void * FreeObjectPool (
void * pObjectPool
)
function FreeObjectPoolIndex
void FreeObjectPoolIndex (
void * pObjectPool,
int indexToFree
)
function GetObjectPoolIndex
returns the object pool, possibly resized. returns index of a free space in the pool through pOutIndex
void * GetObjectPoolIndex (
void * pObjectPool,
int * pOutIndex
)
function InitObjectPool
void * InitObjectPool (
int objectSize,
int poolInitialSize
)
Macro Definition Documentation
define NEW_OBJECT_POOL
#define NEW_OBJECT_POOL (
a,
size
) `((a*)InitObjectPool(sizeof(a),size))`
define OBJECT_POOL
#define OBJECT_POOL (
a
) `a*`
define OBJ_POOL_BOUNDS_CHECK
#define OBJ_POOL_BOUNDS_CHECK (
handle,
rVal,
pool
) `/* multi line expression */`
define OBJ_POOL_BOUNDS_CHECK_NO_RETURN
#define OBJ_POOL_BOUNDS_CHECK_NO_RETURN (
handle,
pool
) `/* multi line expression */`
define ObjectPoolCapacity
#define ObjectPoolCapacity (
pObjectPool
) `((((struct ObjectPoolData *)pObjectPool) - 1)->capacity)`
define ObjectPoolFreeArraySize
#define ObjectPoolFreeArraySize (
pObjectPool
) `(((struct ObjectPoolData *)pObjectPool) - 1)->freeObjectsArraySize`
The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/include/ObjectPool.h