IDManager

IDManager is responsible for assignment and removing IDs. IDs are unique throughtout a whole duration of the program.

Members

Functions

deinitialize
void deinitialize()

Free manager memory.

getEntityPointer
Entity* getEntityPointer(EntityID id)

Returns pointer to entity.

getNewID
EntityID getNewID()

Get new ID.

initialize
void initialize()

Initialize manager.

isExist
bool isExist(EntityID id)

Check if entity with specified ID exist.

optimize
void optimize()

Optimize memory. Must be called if any ID was added and some ID will be removed.

releaseID
void releaseID(EntityID id)

Release ID.

update
void update(Entity entity)

Update pointer to entity. The purpose of this function is to ensure that pointer to entity is always correct.

Meta