32 std::map<T, bool> m_occupiedIDs;
41 while (m_occupiedIDs.find(
id) != m_occupiedIDs.end() ||
id == 0) {
44 OTAssert(0,
"There is no free ID available");
#define OTAssert(___expression, ___message)
Adds the ability to provide a custom text to the cassert macro (assertion only in debug mode)
Definition OTAssert.h:16
Definition IDManager.h:19
T grabNextID(void)
Will find the next free id and return it.
Definition IDManager.h:38
virtual ~IDManager()
Definition IDManager.h:36
IDManager()
Definition IDManager.h:35
void freeID(T _id)
Will set the provided id as free.
Definition IDManager.h:56