# Class IntervalAndCargo
A simple record type that stores an interval and a cargo value.

Defined in | <seqan/misc/interval_tree.h>
Signature | `template <[typename TValue[, typename TCargo]]> class IntervalAndCargo;`

## Template Parameters

`TValue` | The value type. Default: `int`.
`TCargo` | The cargo type. Default: `int`.

## Member Function Overview

- `IntervalAndCargo::IntervalAndCargo();, IntervalAndCargo::IntervalAndCargo(i1, i2, cargo);`
  Constructor

## Interface Function Overview

- `TCargo cargo(interval);`
  Access to the cargo.
- `TCargo getCargo(interval);`
  Access to the cargo.
- `TBoundary getLeftBoundary(interval);`
  Access to getLeft boundary.
- `TBoundary getRightBoundary(interval);`
  Access to getRight boundary.
- `TBoundary leftBoundary(interval);`
  Access to left boundary.
- `TBoundary rightBoundary(interval);`
  Access to right boundary.

## Interface Metafunction Overview

- `Cargo<TIntervalAndCargo>::Type;`
  Return the cargo type.
- `Value<TIntervalAndCargo>::Type;`
  Return the value type.

## Member Variable Overview

- `TCargo IntervalAndCargo::cargo`
  The stored cargo.
- `TValue IntervalAndCargo::i1`
  The first element in the interval.
- `TValue IntervalAndCargo::i2`
  The last element in the interval.

## Member Functions Detail

### `IntervalAndCargo::IntervalAndCargo(); IntervalAndCargo::IntervalAndCargo(i1, i2, cargo);`

Constructor

#### Parameters

`i1` | The first element in the interval.
`i2` | The last element in the interval.
`cargo` | The cargo to store together with the interval.

#### Data Races

Thread safety unknown!

## Interface Functions Detail

### `TCargo cargo(interval);`

Access to the cargo.

#### Parameters

`interval` | The IntervalAndCargo to query for its cargo.

#### Returns

`TCargo` | Reference to the cargo member.

#### Data Races

Thread safety unknown!

### `TCargo getCargo(interval);`

Access to the cargo.

#### Parameters

`interval` | The IntervalAndCargo to query for its cargo.

#### Returns

`TCargo` | Copy of the cargo member.

#### Data Races

Thread safety unknown!

### `TBoundary getLeftBoundary(interval);`

Access to getLeft boundary.

#### Parameters

`interval` | The IntervalAndCargo to query for its left boundary.

#### Returns

`TBoundary` | Copy of the left boundary value.

#### Data Races

Thread safety unknown!

### `TBoundary getRightBoundary(interval);`

Access to getRight boundary.

#### Parameters

`interval` | The IntervalAndCargo to query for its right boundary.

#### Returns

`TBoundary` | Copy of the right boundary value.

#### Data Races

Thread safety unknown!

### `TBoundary leftBoundary(interval);`

Access to left boundary.

#### Parameters

`interval` | The IntervalAndCargo to query for its left boundary.

#### Returns

`TBoundary` | Reference to the left boundary value.

#### Data Races

Thread safety unknown!

### `TBoundary rightBoundary(interval);`

Access to right boundary.

#### Parameters

`interval` | The IntervalAndCargo to query for its right boundary.

#### Returns

`TBoundary` | Reference to the right boundary value.

#### Data Races

Thread safety unknown!

## Interface Metafunctions Detail

### `Cargo<TIntervalAndCargo>::Type;`

Return the cargo type.

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

Return the value type.

## Member Variables Detail

### `TCargo IntervalAndCargo::cargo`

The stored cargo.

### `TValue IntervalAndCargo::i1`

The first element in the interval.

### `TValue IntervalAndCargo::i2`

The last element in the interval.

#### Dox Sources

    /*!
     * @class IntervalAndCargo
     *
     * @headerfile <seqan/misc/interval_tree.h>
     *
     * @brief A simple record type that stores an interval and a cargo value.
     *
     * @signature template <[typename TValue[, typename TCargo]]> class
     *            IntervalAndCargo;
     *
     * @tparam TValue The value type. Default: <tt>int</tt>.
     * @tparam TCargo The cargo type. Default: <tt>int</tt>.
     *
     * @mfn IntervalAndCargo#Value
     *
     * @brief Return the value type.
     *
     * @signature Value<TIntervalAndCargo>::Type;
     *
     * @mfn IntervalAndCargo#Cargo
     *
     * @brief Return the cargo type.
     *
     * @signature Cargo<TIntervalAndCargo>::Type;
     *
     * @fn IntervalAndCargo::IntervalAndCargo
     *
     * @brief Constructor
     *
     * @signature IntervalAndCargo::IntervalAndCargo();
     * @signature IntervalAndCargo::IntervalAndCargo(i1, i2, cargo);
     *
     * @param[in] i1 The first element in the interval.
     * @param[in] i2 The last element in the interval.
     * @param[in] cargo The cargo to store together with the interval.
     *
     * @var TValue IntervalAndCargo::i1;
     *
     * @brief The first element in the interval.
     *
     * @var TValue IntervalAndCargo::i2;
     *
     * @brief The last element in the interval.
     *
     * @var TCargo IntervalAndCargo::cargo;
     *
     * @brief The stored cargo.
     *
     * @fn IntervalAndCargo#leftBoundary
     *
     * @brief Access to left boundary.
     *
     * @signature TBoundary leftBoundary(interval);
     *
     * @param[in] interval The IntervalAndCargo to query for its left boundary.
     *
     * @return TBoundary Reference to the left boundary value.
     *
     * @fn IntervalAndCargo#rightBoundary
     *
     * @brief Access to right boundary.
     *
     * @signature TBoundary rightBoundary(interval);
     *
     * @param[in] interval The IntervalAndCargo to query for its right boundary.
     *
     * @return TBoundary Reference to the right boundary value.
     *
     * @fn IntervalAndCargo#getLeftBoundary
     *
     * @brief Access to getLeft boundary.
     *
     * @signature TBoundary getLeftBoundary(interval);
     *
     * @param[in] interval The IntervalAndCargo to query for its left boundary.
     *
     * @return TBoundary Copy of the left boundary value.
     *
     * @fn IntervalAndCargo#getRightBoundary
     *
     * @brief Access to getRight boundary.
     *
     * @signature TBoundary getRightBoundary(interval);
     *
     * @param[in] interval The IntervalAndCargo to query for its right boundary.
     *
     * @return TBoundary Copy of the right boundary value.
     *
     * @fn IntervalAndCargo#cargo
     *
     * @brief Access to the cargo.
     *
     * @signature TCargo cargo(interval);
     *
     * @param[in] interval The IntervalAndCargo to query for its cargo.
     *
     * @return TCargo Reference to the cargo member.
     *
     * @fn IntervalAndCargo#getCargo
     *
     * @brief Access to the cargo.
     *
     * @signature TCargo getCargo(interval);
     *
     * @param[in] interval The IntervalAndCargo to query for its cargo.
     *
     * @return TCargo Copy of the cargo member.
     */