HostedConcept - SeqAn API Documentation

# Concept HostedConcept
Concept for types that have a host.

Defined in |
Signature | `concept HostedConcept;`

## Detailed Description

### Remarks

The functions of this concept assume that the hosted object exports a function `_dataHost` that returns a reference to a holder type of `Host<T>::Type &`.

## Interface Function Overview

- `void assignHost(object, host);`
  Assign to the host of a given value.
- `void clearHost(object);`
  Clear the host of the given object.
- `void createHost(object[, host]);`
  Construct the host of the given object.
- `void clearHost(object);`
  Query dependent state of a hosted object.
- `bool emptyHost(object);`
  Query emptiness state of a hosted object.
- `THostRef host(object);`
  The object a given object depends on.
- `void moveHost(object, host);`
  Move to the host of a given value.
- `void setHost(object, host);`
  Sets the host of an object.

## Interface Metafunction Overview

- `Host<T>::Type`
  Type of the object a given object depends on.

## Interface Functions Detail

### `void assignHost(object, host);`

Assign to the host of a given value.

#### Parameters

`host` | The object to assign as host.
`object` | The object to assign the host of.

#### Data Races

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

### `void clearHost(object);`

Clear the host of the given object.

#### Parameters

`object` | The object to clear the host of.

#### Data Races

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

### `void createHost(object[, host]);`

Construct the host of the given object.

#### Parameters

`object` | The object to copy construct the host of.
`host` | The object to copy in host creation.

#### Remarks

If `host` is given then it is used for copy creation. Otherwise, the default constructor is used.

#### Data Races

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

### `void clearHost(object);`

Query dependent state of a hosted object.

#### Parameters

`object` | The object query state of host of.

#### Returns

`bool` | `true` if the host is dependent, `false` otherwise.

#### Data Races

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

### `bool emptyHost(object);`

Query emptiness state of a hosted object.

#### Parameters

`object` | The object query state of host of.

#### Returns

`bool` | `true` if the host is empty, `false` otherwise.

#### Data Races

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

### `THostRef host(object);`

The object a given object depends on.

#### Parameters

`object` | An object.

#### Returns

`THostRef` | Reference to the host object.

#### Data Races

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

### `void moveHost(object, host);`

Move to the host of a given value.

#### Parameters

`host` | The object to move-assign as host.
`object` | The object to move-assign the host of.

#### Data Races

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

### `void setHost(object, host);`

Sets the host of an object.

#### Parameters

`host` | The new host. Types: String
`object` | The object that will get a new host.

#### Remarks

After this operation, `object` depends on `host`.

Note that setting the host can invalidate `object`. For example, if one changes the host of a Segment object, it is possible that begin- and end-position of the segment does not fit into the new host sequence.

#### Data Races

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

## Interface Metafunctions Detail

### `Host<T>::Type`

Type of the object a given object depends on.

#### Template Parameters

`T` | Type for which the host type is determined.

#### Returns

`Type` | The Host type.

#### Dox Sources

    /*!
     * @concept HostedConcept
     *
     * @brief Concept for types that have a host.
     *
     * @signature concept HostedConcept;
     *
     * @section Remarks
     *
     * The functions of this concept assume that the hosted object exports a
     * function <tt>_dataHost</tt> that returns a reference to a holder type of
     * <tt>Host&lt;T&gt;::Type &amp;</tt>.
     *
     * @mfn HostedConcept#Host
     *
     * @brief Type of the object a given object depends on.
     *
     * @signature Host<T>::Type
     *
     * @tparam T Type for which the host type is determined.
     *
     * @return Type The Host type.
     *
     * @fn HostedConcept#emptyHost
     *
     * @brief Query emptiness state of a hosted object.
     *
     * @signature bool emptyHost(object);
     *
     * @param[in] object The object query state of host of.
     *
     * @return bool <tt>true</tt> if the host is empty, <tt>false</tt> otherwise.
     *
     * @fn HostedConcept#dependentHost
     *
     * @brief Query dependent state of a hosted object.
     *
     * @signature void clearHost(object);
     *
     * @param[in] object The object query state of host of.
     *
     * @return bool <tt>true</tt> if the host is dependent, <tt>false</tt>
     *              otherwise.
     *
     * @fn HostedConcept#clearHost
     *
     * @brief Clear the host of the given object.
     *
     * @signature void clearHost(object);
     *
     * @param[in,out] object The object to clear the host of.
     *
     * @fn HostedConcept#createHost
     *
     * @brief Construct the host of the given object.
     *
     * @signature void createHost(object[, host]);
     *
     * @param[in,out] object The object to copy construct the host of.
     * @param[in] host The object to copy in host creation.
     *
     * @section Remarks
     *
     * If <tt>host</tt> is given then it is used for copy creation. Otherwise, the
     * default constructor is used.
     *
     * @fn HostedConcept#host
     *
     * @brief The object a given object depends on.
     *
     * @signature THostRef host(object);
     *
     * @param[in] object An object.
     *
     * @return THostRef Reference to the host object.
     *
     * @fn HostedConcept#setHost
     *
     * @brief Sets the host of an object.
     *
     * @signature void setHost(object, host);
     *
     * @param[in,out] host The new host. Types: String
     * @param[in] object The object that will get a new host.
     *
     * @section Remarks
     *
     * After this operation, <tt>object</tt> depends on <tt>host</tt>.
     *
     * Note that setting the host can invalidate <tt>object</tt>. For example, if
     * one changes the host of a Segment object, it is possible that begin- and end-
     * position of the segment does not fit into the new host sequence.
     *
     * @fn HostedConcept#assignHost
     *
     * @brief Assign to the host of a given value.
     *
     * @signature void assignHost(object, host);
     *
     * @param[in,out] host The object to assign as host.
     * @param[in] object The object to assign the host of.
     *
     * @fn HostedConcept#moveHost
     *
     * @brief Move to the host of a given value.
     *
     * @signature void moveHost(object, host);
     *
     * @param[in,out] host The object to move-assign as host.
     * @param[in,out] object The object to move-assign the host of.
     */