#ifndef BREEZE_OBJECT_POOL_H
#define BREEZE_OBJECT_POOL_H

#include "../defines.h"

typedef struct BzObjectPool BzObjectPool;

typedef struct BzObjectPoolDesc {
    size_t objectSize;
    size_t numObjects;
} BzObjectPoolDesc;

BzObjectPool *bzObjectPoolCreate(const BzObjectPoolDesc *desc);
void bzObjectPoolDestroy(BzObjectPool *pool);

size_t bzObjectPoolCalcNumFree(BzObjectPool *pool);
void *bzObjectPool(BzObjectPool *pool);
void *bzObjectPoolGetObject(BzObjectPool *pool, i32 idx);
i32 bzObjectPoolGetIdx(BzObjectPool *pool, void *object);
void bzObjectPoolRelease(BzObjectPool *pool, void *object);

#endif //BREEZE_OBJECT_POOL_H
