# Concept StreamConcept
Base concept for streams.

All Subcl's | BidirectionalStreamConcept, InputStreamConcept, OutputStreamConcept
Defined in | <seqan/basic.h>
Signature | `concept StreamConcept;`

## Interface Function Overview

- `bool atEnd(stream);`
  Return whether stream is at the end.
- `TDirIter directionIterator(stream, dirTag);`
  Returns direction iterator for Stream.
- `TPosition position(stream);`
  Return current stream position.
- `void setPosition(stream, pos);`
  Set stream position.

## Interface Metafunction Overview

- `DirectionIterator<TStream>::Type;`
  Return the direction iterator for the given direction.
- `Position<TStream>::Type;`
  Metafunction for retrieving the position type of a stream.
- `Size<TStream>::Type;`
  Metafunction for retrieving the type of a stream.
- `Value<TStream>::Type;`
  Metafunction for retrieving the value type of a stream.

## Interface Functions Detail

### `bool atEnd(stream);`

Return whether stream is at the end.

#### Parameters

`stream` | The stream to check.

#### Returns

`bool` | `true` if the file at EOF, `false` otherwise.

#### Data Races

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

### `TDirIter directionIterator(stream, dirTag);`

Returns direction iterator for Stream.

#### Parameters

`stream` | The StreamConcept object to compute iterator for.
`dirTag` | Direction tag, one of the DirectionTags.

#### Data Races

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

### `TPosition position(stream);`

Return current stream position.

#### Parameters

`stream` | The stream to query.

#### Returns

`TPosition` | Current position in stream, see Position.

#### Data Races

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

### `void setPosition(stream, pos);`

Set stream position.

#### Parameters

`stream` | The stream to update
`pos` | The positoin to set.

#### Data Races

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

## Interface Metafunctions Detail

### `DirectionIterator<TStream>::Type;`

Return the direction iterator for the given direction.

#### Template Parameters

`TStream` | The stream to query for its direction iterator.

#### Returns

`Type` | The resulting direction iterator.

### `Position<TStream>::Type;`

Metafunction for retrieving the position type of a stream.

#### Template Parameters

`TStream` | The stream type to query for its position type.

#### Returns

`Type` | The resulting position type.

### `Size<TStream>::Type;`

Metafunction for retrieving the type of a stream.

#### Template Parameters

`TStream` | The stream type to query for its size type.

#### Returns

`Type` | The resulting size type.

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

Metafunction for retrieving the value type of a stream.

#### Template Parameters

`TStream` | The stream type to query for its value type.

#### Returns

`Type` | The resulting value type.

#### Dox Sources

    /*!
     * @concept StreamConcept
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Base concept for streams.
     *
     * @signature concept StreamConcept;
     *
     * @mfn StreamConcept#Value
     *
     * @brief Metafunction for retrieving the value type of a stream.
     *
     * @signature Value<TStream>::Type;
     *
     * @tparam TStream The stream type to query for its value type.
     *
     * @return Type The resulting value type.
     *
     * @mfn StreamConcept#Size
     *
     * @brief Metafunction for retrieving the type of a stream.
     *
     * @signature Size<TStream>::Type;
     *
     * @tparam TStream The stream type to query for its size type.
     *
     * @return Type The resulting size type.
     *
     * @mfn StreamConcept#Position
     *
     * @brief Metafunction for retrieving the position type of a stream.
     *
     * @signature Position<TStream>::Type;
     *
     * @tparam TStream The stream type to query for its position type.
     *
     * @return Type The resulting position type.
     *
     * @mfn StreamConcept#DirectionIterator
     *
     * @brief Return the direction iterator for the given direction.
     *
     * @signature DirectionIterator<TStream>::Type;
     *
     * @tparam TStream The stream to query for its direction iterator.
     *
     * @return Type The resulting direction iterator.
     *
     * @fn StreamConcept#position
     *
     * @brief Return current stream position.
     *
     * @signature TPosition position(stream);
     *
     * @param[in] stream The stream to query.
     *
     * @return TPosition Current position in stream, see @link
     *                   StreamConcept#Position Position @endlink.
     *
     * @fn StreamConcept#setPosition
     *
     * @brief Set stream position.
     *
     * @signature void setPosition(stream, pos);
     *
     * @param[in,out] stream The stream to update
     * @param[in] pos The positoin to set.
     *
     * @fn StreamConcept#atEnd
     *
     * @brief Return whether stream is at the end.
     *
     * @signature bool atEnd(stream);
     *
     * @param[in] stream The stream to check.
     *
     * @return bool <tt>true</tt> if the file at EOF, <tt>false</tt> otherwise.
     *
     * @fn StreamConcept#directionIterator
     *
     * @brief Returns direction iterator for Stream.
     *
     * @signature TDirIter directionIterator(stream, dirTag);
     *
     * @param[in] stream The @link StreamConcept @endlink object to compute iterator
     *                   for.
     * @param[in] dirTag Direction tag, one of the @link DirectionTags @endlink.
     */