Class
IdManagerID manager that provides uniq ids for vertices and edges.
ID manager that provides uniq ids for vertices and edges.
All Subcl's | CountingIdManager |
---|---|
Defined in | <seqan/graph_types.h> |
Signature |
template <typename TIdType, typename TSpec>
class IdManager;
|
Template Parameters
TIdType |
The type to use for storing IDs. Use the Value metafunctio to get the id type managed by a given IdManager. |
---|---|
TSpec |
Specializing type. |
Interface Function Overview
-
TId getIdLowerBound(manager);
Returns the smalles distributed id. -
TId getIdUpperBound(manager);
Returns the largest distributed id plus 1. -
TId idCount(manager);
Return the number of obtained ids. -
bool idInUse(manager, id);
Return whether an id is in use. -
TId obtainId(manager);
Obatains a new id from the id manager. -
void releaseAll(manager);
Releases all ids handled by this IdManager. -
void releaseId(manager, id);
Releases a given id so it can be reused later on.
Interface Metafunction Overview
-
Spec<TIdManager>::Type;
Return the specializing type of an IdManager. -
Value<TIdManager>::Type;
Return the value type of an IdManager.
Interface Functions Detail
TId getIdLowerBound(manager);
Returns the smalles distributed id.
Parameters
manager
|
The IdManager to query. |
---|
Returns
TId |
The smallest obtained id so far. |
---|
Data Races
Thread safety unknown!
TId getIdUpperBound(manager);
Returns the largest distributed id plus 1.
Parameters
manager
|
The IdManager to query. |
---|
Returns
TId |
The return value is guaranteed to be an upper bound on all distributed ids. |
---|
Data Races
Thread safety unknown!
TId idCount(manager);
Return the number of obtained ids.
Parameters
manager
|
The IdManager to query. |
---|
Returns
TId |
The number of ids obtained so far. |
---|
Data Races
Thread safety unknown!
bool idInUse(manager, id);
Return whether an id is in use.
Parameters
manager
|
The IdManager to query. |
---|---|
id
|
The id to check for. |
Returns
bool |
true if the id is already in use and false otherwise. |
---|
Data Races
Thread safety unknown!
TId obtainId(manager);
Obatains a new id from the id manager.
Parameters
manager
|
IdManager to get ids from. |
---|
Returns
TId |
A new unique id. |
---|
Data Races
Thread safety unknown!
void releaseAll(manager);
Releases all ids handled by this IdManager.
Parameters
manager
|
The IdManager to release the ids from. |
---|
Data Races
Thread safety unknown!
void releaseId(manager, id);
Releases a given id so it can be reused later on.
Parameters
manager
|
The IdManager to use. |
---|---|
id
|
The ID to release. |
Data Races
Thread safety unknown!