22 #ifndef ULTIMA8_MISC_IDMAN_H 23 #define ULTIMA8_MISC_IDMAN_H 25 #include "ultima/shared/std/containers.h" 58 idMan(uint16 begin, uint16 max_end, uint16 startcount = 0);
63 return _first == 0 && _end >= _maxEnd;
83 return id >= _begin &&
id <= _end && _ids[id] == 0 &&
id != _last;
bool isIDUsed(uint16 id) const
check if an ID is in use
Definition: id_man.h:82
bool reserveID(uint16 id)
Definition: detection.h:27
idMan(uint16 begin, uint16 max_end, uint16 startcount=0)
void setNewMax(uint16 maxEnd)
Definition: id_man.h:91
void clearAll(uint16 new_max=0)
clear all IDs, reset size to the startcount, and set max_end to new_max
bool isFull() const
check if this idMan is full
Definition: id_man.h:62
void clearID(uint16 id)
release an id