|
OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Simple class to manage an ID pool. More...
#include <ManagedIDs.h>
Public Member Functions | |
| ManagedIDs () | |
| size_t | nextID () |
| return next free ID More... | |
| void | freeID (size_t id) |
| free previously allocated ID More... | |
Private Attributes | |
| std::queue< size_t > | freeids_ |
| queue to handle freed ID's More... | |
| size_t | next_free_ |
| next free ID More... | |
Simple class to manage an ID pool.
Previously freed ID's are redistributed on following requests.
Definition at line 9 of file ManagedIDs.h.
|
inline |
Definition at line 13 of file ManagedIDs.h.
|
inline |
free previously allocated ID
Definition at line 34 of file ManagedIDs.h.
References freeids_, and next_free_.
|
inline |
return next free ID
Definition at line 17 of file ManagedIDs.h.
References freeids_, and next_free_.
|
private |
queue to handle freed ID's
Definition at line 46 of file ManagedIDs.h.
|
private |
1.8.5