libassa
3.5.1
|
#include <IdSet.h>
Public Member Functions | |
IdSet () | |
Default constructor creates IdSet object with ID equals to 0. More... | |
int | newid () |
Return current id. More... | |
int | recycle (int id_) |
Recycle id_. More... | |
int | currid () const |
Get current id. More... | |
Private Attributes | |
int | m_next_available_id |
Current id. More... | |
fd_set | m_id_set_map |
Map of all ids. More... | |
|
inline |
Default constructor creates IdSet object with ID equals to 0.
Definition at line 70 of file IdSet.h.
References m_id_set_map.
|
inline |
Get current id.
This function just returns current id without changing anything.
Definition at line 78 of file IdSet.h.
References m_next_available_id.
int IdSet::newid | ( | ) |
Return current id.
Mark it as being in use and set new current id value to the next lowest available.
Definition at line 19 of file IdSet.cpp.
References m_id_set_map, m_next_available_id, and trace.
int IdSet::recycle | ( | int | id_ | ) |
Recycle id_.
Mark it as available and adjust current id if necessary.
Definition at line 53 of file IdSet.cpp.
References m_id_set_map, m_next_available_id, and trace.
|
private |
|
private |