# Concept OutputIteratorConcept
Iterator that allows dereferenced writing.

Extends | CopyConstructibleConcept, IteratorAssociatedTypesConcept
All Extended | CopyConstructibleConcept, IteratorAssociatedTypesConcept
All Subcl's | MutableForwardIteratorConcept, MutableRootedIteratorConcept
Defined in | <seqan/basic.h>
Signature | `OutputIteratorConcept<T>`

## Detailed Description

The SeqAn iterators mirror the definitions from ConceptC++. *

### Examples

In the following, `x` is an iterator to type `X`, `t` is a valid rvalue of type `X`.

The following expressions must be valid.

    *x = t     // Dereference assignment.
    ++x        // Preincrement.
    (void)x++  // Postincrement.
    *x++ = t   // Postincrement and assign.

    assignValue(x, t);

## See Also

- InputIteratorConcept

## Interface Function Overview

- `void assignValue(it, value);`
  Assigns value to iterator.
- `void goNext(it);`
  Iterates to next position.
- `void moveValue(container, pos, value);`
  Move a value of a container to a given position.
- `TIterator operator++(it)`
  C++ built-in prefix increment operator.
- `TIterator operator++(it, i)`
  C++ built-in suffix increment operator.
- `void writeValue(iter, val);`
  Write a single value to a container by dereferencing its iterator.

### Interface Functions Inherited From IteratorAssociatedTypesConcept

- `getValue`
- `operator*`
- `value`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From IteratorAssociatedTypesConcept

- `Difference`
- `GetValue`
- `Pointer`
- `Reference`
- `Value`

## Interface Functions Detail

### `void assignValue(it, value);`

Deprecated.

Use dereferencement and assignment instead.

Assigns value to iterator.

#### Parameters

`it` | The iterator to assign value to.
`value` | A value that is assigned to the item `it` points to.

#### Data Races

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

### `void goNext(it);`

Iterates to next position.

#### Parameters

`it` | The iterator to increment.

This function is equivalent to `++iterator`.

#### Data Races

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

### `void moveValue(container, pos, value);`

Move a value of a container to a given position.

#### Parameters

`container` | The container to manipulate.
`pos` | The position of the item in the container to manipulate.
`value` | The value to move to `container[pos]`.

#### Data Races

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

### `TIterator operator++(it)`

C++ built-in prefix increment operator.

#### Parameters

`it` | The iterator to increment.

#### Returns

`TIterator` | A copy of the original iterator.

#### Data Races

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

### `TIterator operator++(it, i)`

C++ built-in suffix increment operator.

#### Parameters

`it` | The iterator to increment.
`i` | An integer, used to mark suffix decrement.

#### Returns

`TIterator` | A copy of the original iterator.

#### Data Races

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

### `void writeValue(iter, val);`

Write a single value to a container by dereferencing its iterator.

#### Parameters

`iter` | The iterator to use for dereferenced writing.
`val` | The value to write into the container.

If the host of `iter` is a ContainerConcept then container is resized to make space for the item.

#### Data Races

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

#### Dox Sources

    /*!
     * @concept OutputIteratorConcept
     *
     * @headerfile <seqan/basic.h>
     *
     * @extends IteratorAssociatedTypesConcept
     * @extends CopyConstructibleConcept
     *
     * @brief Iterator that allows dereferenced writing.
     *
     * @signature OutputIteratorConcept<T>
     *
     * The SeqAn iterators mirror the definitions from <a href="http://generic-progr
     * amming.org/languages/conceptcpp/concept_web.php?header=iterator">ConceptC++</
     * a>. *
     *
     * @section Examples
     *
     * In the following, <tt>x</tt> is an iterator to type <tt>X</tt>, <tt>t</tt> is
     * a valid rvalue of type <tt>X</tt>.
     *
     * The following expressions must be valid.
     *
     * @code{.cpp}
     * *x = t     // Dereference assignment.
     * ++x        // Preincrement.
     * (void)x++  // Postincrement.
     * *x++ = t   // Postincrement and assign.
     *
     * assignValue(x, t);
     * @endcode
     *
     *
     * @see InputIteratorConcept
     *
     * @fn OutputIteratorConcept#moveValue
     *
     * @headerfile <seqan/sequence.h>
     *
     * @brief Move a value of a container to a given position.
     *
     * @signature void moveValue(container, pos, value);
     *
     * @param[in,out] container The container to manipulate.
     * @param[in] pos The position of the item in the container to manipulate.
     * @param[in,out] value The value to move to <tt>container[pos]</tt>.
     *
     * @fn OutputIteratorConcept#assignValue
     *
     * @brief Assigns value to iterator.
     *
     * @deprecated Use dereferencement and assignment instead.
     *
     * @signature void assignValue(it, value);
     *
     * @param[in,out] it The iterator to assign value to.
     * @param[in] value A value that is assigned to the item <tt>it</tt> points to.
     *
     * @fn OutputIteratorConcept#operator++(suffix)
     *
     * @brief C++ built-in suffix increment operator.
     *
     * @signature TIterator operator++(it, i)
     *
     * @param[in,out] it The iterator to increment.
     * @param[in] i An integer, used to mark suffix decrement.
     *
     * @return TIterator A copy of the original iterator.
     *
     * @fn OutputIteratorConcept#operator++(prefix)
     *
     * @brief C++ built-in prefix increment operator.
     *
     * @signature TIterator operator++(it)
     *
     * @param[in,out] it The iterator to increment.
     *
     * @return TIterator A copy of the original iterator.
     *
     * @fn OutputIteratorConcept#goNext
     *
     * @brief Iterates to next position.
     *
     * @signature void goNext(it);
     *
     * @param[in,out] it The iterator to increment.
     *
     * This function is equivalent to <tt>++iterator</tt>.
     *
     * @fn OutputIteratorConcept#writeValue
     *
     * @brief Write a single value to a container by dereferencing its iterator.
     *
     * @signature void writeValue(iter, val);
     *
     * @param[in,out] iter The iterator to use for dereferenced writing.
     * @param[in] val The value to write into the container.
     *
     * If the host of <tt>iter</tt> is a @link ContainerConcept @endlink then
     * container is resized to make space for the item.
     */