An index allocation map.
More...
#include <AllocationMap.h++>
An index allocation map.
- Author
- Mark Lindner
◆ AllocationMap()
Construct a new AllocationMap with the given size.
- Parameters
-
size | The number of indexes to allocate in the map. |
◆ ~AllocationMap()
◆ getSize()
Get the size of the map.
- Returns
- The number of indexes in the map.
◆ isReserved()
bool isReserved |
( |
uint_t |
index | ) |
const |
Determine if a given index is reserved.
- Parameters
-
- Returns
- true if the index is reserved, false if it is available.
◆ release()
Release an index.
- Parameters
-
index | The index to release. |
- Returns
- true if the index was released, false if the index wasn't reserved or if the index is out of range.
◆ reserve()
Reserve an index from the map.
- Returns
- The reserved index, or -1 if no free index is available.
The documentation for this class was generated from the following files: