#include <idPool.h>
Manages unique identifiers.
Definition at line 25 of file idPool.h.
Public Types | |
| enum | MaxCapacity { MAX_CAPACITY = 0xfffffff0 } |
Public Member Functions | |
| IDPool (const uint32_t initialCapacity) | |
| Constructs a new identifier pool. | |
| ~IDPool () | |
| Destructs the identifier pool. | |
| uint32_t | genIDs (const uint32_t range) |
| Generate a new, consecutive block of identifiers. | |
| void | freeIDs (const uint32_t start, const uint32_t range) |
Classes | |
| struct | Block |
| eq::base::IDPool::IDPool | ( | const uint32_t | initialCapacity | ) |
Constructs a new identifier pool.
| initialCapacity | the initial capacity of the pool, the identifiers from initialCapacity to MAX_CAPACITY are considered as allocated. |
Definition at line 19 of file idPool.cpp.
| eq::base::IDPool::~IDPool | ( | ) |
| uint32_t eq::base::IDPool::genIDs | ( | const uint32_t | range | ) |
Generate a new, consecutive block of identifiers.
| range | The number of identifiers to allocate |
Definition at line 48 of file idPool.cpp.
Referenced by eq::net::Session::genIDs().
0.6 by
1.5.5