Go to the documentation of this file.
26 #ifndef __UTIL_STORAGE_H__
27 #define __UTIL_STORAGE_H__
void StorageFreeAll(Storage *storage, const StorageEnum type)
void StorageFree(Storage **storage, const StorageEnum type)
void StorageFreeById(Storage *storage, const StorageEnum type, const int id)
int StorageFinalize(void)
void * StorageAllocByIdPrealloc(Storage *storage, StorageEnum type, int id)
AllocById func for prealloc'd base storage (storage ptrs are part of another memory block)
enum StorageEnum_ StorageEnum
void * StorageGetById(const Storage *storage, const StorageEnum type, const int id)
get storage for id
unsigned int StorageGetSize(const StorageEnum type)
get the size of the void array used to store the pointers
void StorageCleanup(void)
int StorageRegister(const StorageEnum type, const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void(*Free)(void *))
Register new storage.
void * StorageAllocById(Storage **storage, const StorageEnum type, const int id)
AllocById func for when we manage the Storage ptr itself.
int StorageSetById(Storage *storage, const StorageEnum type, const int id, void *ptr)
set storage for id
unsigned int StorageGetCnt(const StorageEnum type)
void StorageRegisterTests(void)