#include <value_allocator.hpp>
◆ value_allocator()
Create value_allocator The allocator has [lowest, highest] values.
- Parameters
-
lowest | The lowest value |
highest | The highest value. |
◆ allocate()
Allocate one value.
- Returns
- If allocator has at least one value, then returns lowest value, otherwise return nullopt.
◆ clear()
Clear all allocated or used values.
◆ deallocate()
Dellocate one value.
- Parameters
-
value | value to deallocate. The value must be gotten by allocate() or declared by use(). |
◆ dump()
◆ first_vacant()
Get the first vacant value.
- Returns
- If allocator has at least one vacant value, then returns lowest value, otherwise return nullopt.
◆ interval_count()
◆ use()
Declare the value as used.
- Parameters
-
value | The value to declare using |
- Returns
- If value is not used or allocated then true, otherwise false
The documentation for this class was generated from the following file: