AllocationMap Class Reference
An index allocation map.
More...
#include <AllocationMap.h++>
List of all members.
Detailed Description
An index allocation map.
- Author:
- Mark Lindner
Constructor & Destructor Documentation
Construct a new AllocationMap with the given size.
- Parameters:
-
| size | The number of indexes to allocate in the map. |
Member Function Documentation
| uint_t getSize |
( |
|
) |
const throw () [inline] |
Get the size of the map.
- Returns:
- The number of indexes in the map.
| bool isReserved |
( |
uint_t |
index |
) |
const throw () |
Determine if a given index is reserved.
- Parameters:
-
- Returns:
- true if the index is reserved, false if it is available.
| bool release |
( |
uint_t |
index |
) |
throw () |
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 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: