class MAGES::Utilities::Collections::IdPool¶
Overview¶
An id generator that can be used to generate unique ids for objects. More…
class IdPool
{
public:
// methods
IdPool();
int Get();
void Release(int id);
};
Detailed Documentation¶
An id generator that can be used to generate unique ids for objects.
Methods¶
IdPool()
Initializes a new instance of the IdPool class.
Parameters:
initCapacity |
The initial returned pool capacity. |
int Get()
Gets an available id.
Returns:
The id.
void Release(int id)
Releases the id.
Parameters:
id |
The id to return. |