preCICE v3.1.2
|
Manages a set of unique IDs. More...
#include <ManageUniqueIDs.hpp>
Public Member Functions | |
int | getFreeID () |
bool | insertID (int id) |
Inserts an ID which has to be unique. | |
void | resetIDs () |
Resets all retrieved and inserted IDs. | |
Private Attributes | |
boost::container::flat_set< int > | _ids |
Stores all used IDs. | |
int | _lowerLimit = 0 |
Marks next ID to be given, from lower to higher values. | |
Manages a set of unique IDs.
Definition at line 10 of file ManageUniqueIDs.hpp.
int precice::utils::ManageUniqueIDs::getFreeID | ( | ) |
Definition at line 6 of file ManageUniqueIDs.cpp.
bool precice::utils::ManageUniqueIDs::insertID | ( | int | id | ) |
Inserts an ID which has to be unique.
The inserted ID has to be different to all other IDs inserted and obtained from getFreeID().
Definition at line 19 of file ManageUniqueIDs.cpp.
void precice::utils::ManageUniqueIDs::resetIDs | ( | ) |
Resets all retrieved and inserted IDs.
Definition at line 29 of file ManageUniqueIDs.cpp.
|
private |
Stores all used IDs.
Definition at line 28 of file ManageUniqueIDs.hpp.
|
private |
Marks next ID to be given, from lower to higher values.
Definition at line 31 of file ManageUniqueIDs.hpp.