RnaStructFileIn - SeqAn API Documentation

# Spec RnaStructFileIn
Class for reading DBN, DBV, CT, STH, BPSEQ, and EBPSEQ files containing RNA structures.

Extends | FormattedFileIn
All Extended | FormattedFile, FormattedFileIn
Defined in | <seqan/rna_io.h>
Signature | `typedef FormattedFile<RnaStruct, Input> RnaStructFileIn;`

## Member Function Overview

### Member Functions Inherited From FormattedFile

- `getFileExtensions`
- `operatorTDependentContext`

## Interface Function Overview

- `void readHeader(header, fileIn);`
  Read one FormattedFileHeaderConcept from an RnaStructFileIn object.
- `void readRecord(record, fileIn);`
  Read one FormattedFileRecordConcept from an RnaStructFileIn object.
- `void readRecords(contents, fileIn, maxRecords);`
  Read RnaStructContents from a RnaStructFileIn object.

### Interface Functions Inherited From FormattedFile

- `atEnd`
- `close`
- `context`
- `format`
- `FormattedFile`
- `getFileExtensions`
- `guessFormat`
- `isOpen`
- `open`
- `setFormat`

### Interface Functions Inherited From FormattedFileIn

- `readHeader`
- `readRecord`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From FormattedFile

- `FileFormat`
- `FormattedFileContext`

## Interface Functions Detail

### `void readHeader(header, fileIn);`

Read one FormattedFileHeaderConcept from an RnaStructFileIn object.

#### Parameters

`header` | The RnaHeader object where to write the information into.
`fileIn` | The RnaStructFileIn object to read from.

#### Thrown Exceptions

`IOError` | On low-level I/O errors.
`ParseError` | On high-level file format errors.

#### Data Races

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

### `void readRecord(record, fileIn);`

Read one FormattedFileRecordConcept from an RnaStructFileIn object.

#### Parameters

`record` | The RnaRecord object where to write the information into.
`fileIn` | The RnaStructFileIn object to read from.

#### Thrown Exceptions

`IOError` | On low-level I/O errors.
`ParseError` | On high-level file format errors.

#### Data Races

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

### `void readRecords(contents, fileIn, maxRecords);`

Read RnaStructContents from a RnaStructFileIn object.

#### Parameters

`contents` | The RnaStructContents object where to write the information into.
`fileIn` | The RnaStructFileIn object to read from.
`maxRecords` | The maximum number of records to read.

#### Thrown Exceptions

`IOError` | On low-level I/O errors.
`ParseError` | On high-level file format errors.

#### Data Races

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

#### See Also

- readHeader
- readRecord

#### Dox Sources

    /*!
     * @class RnaStructFileIn
     *
     * @extends FormattedFileIn
     *
     * @headerfile <seqan/rna_io.h>
     *
     * @brief Class for reading DBN, DBV, CT, STH, BPSEQ, and EBPSEQ files
     *        containing RNA structures.
     *
     * @signature typedef FormattedFile<RnaStruct, Input> RnaStructFileIn;
     *
     * @fn RnaStructFileIn#readRecord
     *
     * @brief Read one @link FormattedFileRecordConcept @endlink from an @link
     *        RnaStructFileIn @endlink object.
     *
     * @signature void readRecord(record, fileIn);
     *
     * @param[in,out] record The @link RnaRecord @endlink object where to write the
     *                       information into.
     * @param[in] fileIn The @link RnaStructFileIn @endlink object to read from.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @fn RnaStructFileIn#readHeader
     *
     * @brief Read one @link FormattedFileHeaderConcept @endlink from an @link
     *        RnaStructFileIn @endlink object.
     *
     * @signature void readHeader(header, fileIn);
     *
     * @param[in,out] header The @link RnaHeader @endlink object where to write the
     *                       information into.
     * @param[in] fileIn The @link RnaStructFileIn @endlink object to read from.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @fn RnaStructFileIn#readRecords
     *
     * @brief Read @link RnaStructContents @endlink from a @link RnaStructFileIn
     *        @endlink object.
     *
     * @signature void readRecords(contents, fileIn, maxRecords);
     *
     * @param[in,out] contents The @link RnaStructContents @endlink object where to
     *                         write the information into.
     * @param[in] fileIn The @link RnaStructFileIn @endlink object to read from.
     * @param[in] maxRecords The maximum number of records to read.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @see RnaStructFileIn#readRecord
     * @see RnaStructFileIn#readHeader
     */