OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Private Attributes | List of all members
ManagedIDs Class Reference

#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...
 

Detailed Description

Definition at line 27 of file ManagedIDs.h.

Constructor & Destructor Documentation

◆ ManagedIDs()

ManagedIDs::ManagedIDs ( )
inline

Definition at line 31 of file ManagedIDs.h.

Member Function Documentation

◆ freeID()

void ManagedIDs::freeID ( size_t  id)
inline

free previously allocated ID

Definition at line 52 of file ManagedIDs.h.

References freeids_, and next_free_.

◆ nextID()

size_t ManagedIDs::nextID ( )
inline

return next free ID

Definition at line 35 of file ManagedIDs.h.

References freeids_, and next_free_.

Member Data Documentation

◆ freeids_

std::queue<size_t> ManagedIDs::freeids_
private

queue to handle freed ID's

Definition at line 64 of file ManagedIDs.h.

Referenced by freeID(), and nextID().

◆ next_free_

size_t ManagedIDs::next_free_
private

next free ID

Definition at line 67 of file ManagedIDs.h.

Referenced by freeID(), and nextID().


The documentation for this class was generated from the following file: