An index allocation map.
More...
#include <AllocationMap.h++>
An index allocation map.
- Author
- Mark Lindner
◆ AllocationMap()
◆ ~AllocationMap()
◆ clear()
Clears the allocation map.
Releases every reserved index.
◆ getSize()
◆ isReserved()
| bool isReserved |
( |
int |
index | ) |
const |
Tests if a given index is reserved.
- Parameters
-
- Returns
- true if the index is reserved, false if it is available.
◆ release()
| void release |
( |
int |
index | ) |
|
Releases 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() [1/2]
Reserves an index in the map.
- Returns
- The reserved index, or -1 if no free index is available.
◆ reserve() [2/2]
| void reserve |
( |
int |
index | ) |
|
Reserves the specified index in the map.
- Parameters
-
| index | The index to reserve. |
The documentation for this class was generated from the following file: