# Class IdManager
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

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

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

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

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

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

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

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

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

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `void releaseAll(manager);`

Releases all ids handled by this IdManager.

#### Parameters

`manager` | The IdManager to release the ids from.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

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

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

## Interface Metafunctions Detail

### `Spec<TIdManager>::Type;`

Return the specializing type of an IdManager.

### `Value<TIdManager>::Type;`

Return the value type of an IdManager.

#### Dox Sources

    /*!
     * @class IdManager
     *
     * @headerfile <seqan/graph_types.h>
     *
     * @brief ID manager that provides uniq ids for vertices and edges.
     *
     * @signature template <typename TIdType, typename TSpec> class IdManager;
     *
     * @tparam TIdType The type to use for storing IDs. Use the Value metafunctio to
     *                 get the id type managed by a given IdManager.
     * @tparam TSpec Specializing type.
     *
     * @mfn IdManager#Value
     *
     * @brief Return the value type of an IdManager.
     *
     * @signature Value<TIdManager>::Type;
     *
     * @mfn IdManager#Spec
     *
     * @brief Return the specializing type of an IdManager.
     *
     * @signature Spec<TIdManager>::Type;
     *
     * @fn IdManager#obatinId
     *
     * @brief Obatains a new id from the id manager.
     *
     * @signature TId obtainId(manager);
     *
     * @param[in,out] manager IdManager to get ids from.
     *
     * @return TId A new unique id.
     *
     * @fn IdManager#releaseId
     *
     * @brief Releases a given id so it can be reused later on.
     *
     * @signature void releaseId(manager, id);
     *
     * @param[in,out] manager The IdManager to use.
     * @param[in] id The ID to release.
     *
     * @fn IdManager#releaseAll
     *
     * @brief Releases all ids handled by this IdManager.
     *
     * @signature void releaseAll(manager);
     *
     * @param[in,out] manager The IdManager to release the ids from.
     *
     * @fn IdManager#getIdUpperBound
     *
     * @brief Returns the largest distributed id plus 1.
     *
     * @signature TId getIdUpperBound(manager);
     *
     * @param[in] manager The IdManager to query.
     *
     * @return TId The return value is guaranteed to be an upper bound on all
     *             distributed ids.
     *
     * @fn IdManager#getIdLowerBound
     *
     * @brief Returns the smalles distributed id.
     *
     * @signature TId getIdLowerBound(manager);
     *
     * @param[in] manager The IdManager to query.
     *
     * @return TId The smallest obtained id so far.
     *
     * @fn IdManager#idCount
     *
     * @brief Return the number of obtained ids.
     *
     * @signature TId idCount(manager);
     *
     * @param[in] manager The IdManager to query.
     *
     * @return TId The number of ids obtained so far.
     *
     * @fn IdManager#idInUse
     *
     * @brief Return whether an id is in use.
     *
     * @signature bool idInUse(manager, id);
     *
     * @param[in] manager The IdManager to query.
     * @param[in] id The id to check for.
     *
     * @return bool true if the id is already in use and false otherwise.
     */