# Class GapsIterator
Iterator class for Gaps.

Implements | RandomAccessIteratorConcept
All Impl'd | BidirectionalIteratorConcept, CopyConstructibleConcept, DefaultConstructibleConcept, EqualityComparableConcept, ForwardIteratorConcept, InputIteratorConcept, IteratorAssociatedTypesConcept, LessThanComparableConcept, RandomAccessIteratorConcept
Defined in |
Signature | `template <typename TGaps, typename TSpec> class Iter<TGaps, GapsIterator<TSpec> >;`

## Template Parameters

`TGaps` | The Gaps object for the iterator.
`TSpec` | The specializing tag.

## Member Function Overview

### Member Functions Inherited From EqualityComparableConcept

- `operator!=`
- `operator==`

### Member Functions Inherited From LessThanComparableConcept

- `operator<`

### Member Functions Inherited From RandomAccessIteratorConcept

- `operator[]`

## Interface Function Overview

- `TSize countCharacters(it[, dir]);`
  Count characters at iterator.
- `TSize countGaps(it[, dir]);`
  Count gaps at iterator.
- `void insertGap(it);`
  Insert gap at the current position.
- `void insertGaps(it, num);`
  Insert gaps at the current position.
- `bool isCharacter(it);`
  Query an iterator for being at a character
- `bool isGap(it);`
  Query an iterator for being at a gap
- `TSize removeGap(it);`
  Insert gap at the current position.
- `TSize removeGaps(it, num);`
  Remove gaps from the current position.

### Interface Functions Inherited From BidirectionalIteratorConcept

- `operator--(prefix)`
- `operator--(suffix)`
- `goPrevious`

### Interface Functions Inherited From InputIteratorConcept

- `operator++(suffix)`
- `operator++(prefix)`
- `operator->`
- `goNext`

### Interface Functions Inherited From IteratorAssociatedTypesConcept

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

### Interface Functions Inherited From RandomAccessIteratorConcept

- `difference`
- `operator+=`
- `operator+`
- `operator-=`
- `goNil`
- `goFurther`
- `atNil`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From IteratorAssociatedTypesConcept

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

### Interface Metafunctions Inherited From RandomAccessIteratorConcept

- `Difference`

## Interface Functions Detail

### `TSize countCharacters(it[, dir]);`

Count characters at iterator.

#### Parameters

`it` | Iterator for counting characters at.
`dir` | A tag to specify the counting direction. One of GapDirectionTags. Defaults to RightOfViewPos.

#### Returns

`TSize` | Number of characters.

If the the direction tag is RightOfViewPos the current view position will be included in the count, and excluded when LeftOfViewPos is selected.

#### Data Races

Thread safety unknown!

### `TSize countGaps(it[, dir]);`

Count gaps at iterator.

#### Parameters

`it` | Iterator for counting gaps at.
`dir` | A tag to specify the counting direction. One of GapDirectionTags. Defaults to RightOfViewPos.

#### Returns

`TSize` | Number of gaps.

If the the direction tag is RightOfViewPos the current view position will be included in the count, and excluded when LeftOfViewPos is selected.

#### Data Races

Thread safety unknown!

### `void insertGap(it);`

Insert gap at the current position.

#### Parameters

`it` | The iterator to insert gaps at.

#### Data Races

Thread safety unknown!

### `void insertGaps(it, num);`

Insert gaps at the current position.

#### Parameters

`it` | Remove gap at the given position (if any).
`num` | Number of gaps to insert.

#### Data Races

Thread safety unknown!

### `bool isCharacter(it);`

Query an iterator for being at a character

#### Parameters

`it` | Iterator to query for pointing at a character.

#### Returns

`bool` | `true` if `it` is at a character and `false` otherwise.

#### Data Races

Thread safety unknown!

### `bool isGap(it);`

Query an iterator for being at a gap

#### Parameters

`it` | Iterator to query for pointing at a gap.

#### Returns

`bool` | `true` if `it` is at a gap and `false` otherwise.

#### Data Races

Thread safety unknown!

### `TSize removeGap(it);`

Insert gap at the current position.

#### Parameters

`it` | Remove gap at the given position (if any).

#### Returns

`TSize` | Number of removed gaps.

#### Data Races

Thread safety unknown!

### `TSize removeGaps(it, num);`

Remove gaps from the current position.

#### Parameters

`it` | Remove gap at the given position (if any).
`num` | Number of gaps to remove.

#### Returns

`TSize` | Number of removed gaps.

#### Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @class GapsIterator
     *
     * @implements RandomAccessIteratorConcept
     *
     * @brief Iterator class for @link Gaps @endlink.
     *
     * @signature template <typename TGaps, typename TSpec> class Iter<TGaps,
     *            GapsIterator<TSpec> >;
     *
     * @tparam TGaps The @link Gaps @endlink object for the iterator.
     * @tparam TSpec The specializing tag.
     *
     * @fn GapsIterator#insertGap
     *
     * @brief Insert gap at the current position.
     *
     * @signature void insertGap(it);
     *
     * @param[in,out] it The iterator to insert gaps at.
     *
     * @fn GapsIterator#isCharacter
     *
     * @brief Query an iterator for being at a character
     *
     * @signature bool isCharacter(it);
     *
     * @param[in] it Iterator to query for pointing at a character.
     *
     * @return bool <tt>true</tt> if <tt>it</tt> is at a character and
     *              <tt>false</tt> otherwise.
     *
     * @fn GapsIterator#countCharacters
     *
     * @brief Count characters at iterator.
     *
     * @signature TSize countCharacters(it[, dir]);
     *
     * @param[in] it Iterator for counting characters at.
     * @param[in] dir A tag to specify the counting direction. One of @link
     *                GapDirectionTags @endlink. Defaults to @link
     *                GapDirectionTags#RightOfViewPos @endlink.
     *
     * @return TSize Number of characters.
     *
     * If the the direction tag is @link GapDirectionTags#RightOfViewPos @endlink
     * the current view position will be included in the count, and excluded when
     * @link GapDirectionTags#LeftOfViewPos @endlink is selected.
     *
     * @fn GapsIterator#isGap
     *
     * @brief Query an iterator for being at a gap
     *
     * @signature bool isGap(it);
     *
     * @param[in] it Iterator to query for pointing at a gap.
     *
     * @return bool <tt>true</tt> if <tt>it</tt> is at a gap and <tt>false</tt>
     *              otherwise.
     *
     * @fn GapsIterator#countGaps
     *
     * @brief Count gaps at iterator.
     *
     * @signature TSize countGaps(it[, dir]);
     *
     * @param[in] it Iterator for counting gaps at.
     * @param[in] dir A tag to specify the counting direction. One of @link
     *                GapDirectionTags @endlink. Defaults to @link
     *                GapDirectionTags#RightOfViewPos @endlink.
     *
     * @return TSize Number of gaps.
     *
     * If the the direction tag is @link GapDirectionTags#RightOfViewPos @endlink
     * the current view position will be included in the count, and excluded when
     * @link GapDirectionTags#LeftOfViewPos @endlink is selected.
     *
     * @fn GapsIterator#insertGaps
     *
     * @brief Insert gaps at the current position.
     *
     * @signature void insertGaps(it, num);
     *
     * @param[in,out] it Remove gap at the given position (if any).
     * @param[in] num Number of gaps to insert.
     *
     * @fn GapsIterator#removeGap
     *
     * @brief Insert gap at the current position.
     *
     * @signature TSize removeGap(it);
     *
     * @param[in,out] it Remove gap at the given position (if any).
     *
     * @return TSize Number of removed gaps.
     *
     * @fn GapsIterator#removeGaps
     *
     * @brief Remove gaps from the current position.
     *
     * @signature TSize removeGaps(it, num);
     *
     * @param[in,out] it Remove gap at the given position (if any).
     * @param[in] num Number of gaps to remove.
     *
     * @return TSize Number of removed gaps.
     */