33#define OBJ_ALLOCATED 0x8000
void ObjectCallback(Object *obj)
Object function callback.
Definition object.h:47
struct Object_ Object
Base object structure.
Definition object.h:38
Pool * OBJ_createObjectPool(u16 size, u16 objectSize)
Create and allocate the new object pool (this method is an alias of POOL_create(.....
Definition object.c:37
void OBJ_release(Pool *pool, Object *object, bool maintainCoherency)
Release an objet from the given object pool (object must extend basic Object structure)
Definition object.c:61
void OBJ_setEndMethod(Object *object, ObjectCallback *endMethod)
Set the ending method for the given object.
Definition object.c:87
void OBJ_setInitMethod(Object *object, ObjectCallback *initMethod)
Set the initialization method for the given object.
Definition object.c:71
void OBJ_setUpdateMethod(Object *object, ObjectCallback *updateMethod)
Set the update method for the given object.
Definition object.c:79
Object * OBJ_create(Pool *pool)
Create a new objet from the given object pool (object must extend basic Object structure)
Definition object.c:43
void OBJ_updateAll(Pool *pool)
Iterate over all active objects from the given object pool and call update method for each of them.
Definition object.c:95
Pool object management unit.
Base object structure.
Definition object.h:65
Object pool allocator structure.
Definition pool.h:57
unsigned short u16
Definition types.h:100