preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
precice::utils::ManageUniqueIDs Class Reference

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.
 

Detailed Description

Manages a set of unique IDs.

Definition at line 10 of file ManageUniqueIDs.hpp.

Member Function Documentation

◆ getFreeID()

int precice::utils::ManageUniqueIDs::getFreeID ( )

Definition at line 6 of file ManageUniqueIDs.cpp.

◆ insertID()

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.

◆ resetIDs()

void precice::utils::ManageUniqueIDs::resetIDs ( )

Resets all retrieved and inserted IDs.

Definition at line 29 of file ManageUniqueIDs.cpp.

Member Data Documentation

◆ _ids

boost::container::flat_set<int> precice::utils::ManageUniqueIDs::_ids
private

Stores all used IDs.

Definition at line 28 of file ManageUniqueIDs.hpp.

◆ _lowerLimit

int precice::utils::ManageUniqueIDs::_lowerLimit = 0
private

Marks next ID to be given, from lower to higher values.

Definition at line 31 of file ManageUniqueIDs.hpp.


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