RnaStructFileOut - SeqAn API Documentation

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

Extends | FormattedFileOut
All Extended | FormattedFile, FormattedFileOut
Defined in | <seqan/rna_io.h>
Signature | `typedef FormattedFile<RnaStruct, Output> RnaStructFileOut;`

## Member Function Overview

### Member Functions Inherited From FormattedFile

- `getFileExtensions`
- `operatorTDependentContext`

## Interface Function Overview

- `void writeHeader(fileOut, header);`
  Write one FormattedFileHeaderConcept into an RnaStructFileOut object.
- `void writeRecord(fileOut, record);`
  Write one FormattedFileRecordConcept into an RnaStructFileOut object.
- `void writeRecords(fileOut, contents);`
  Write RnaStructContents into a RnaStructFileOut object.

### Interface Functions Inherited From FormattedFile

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

### Interface Functions Inherited From FormattedFileOut

- `writeHeader`
- `writeRecord`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From FormattedFile

- `FileFormat`
- `FormattedFileContext`

## Interface Functions Detail

### `void writeHeader(fileOut, header);`

Write one FormattedFileHeaderConcept into an RnaStructFileOut object.

#### Parameters

`fileOut` | The RnaStructFileOut object to write into.
`record` | The RnaHeader object where 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 writeRecord(fileOut, record);`

Write one FormattedFileRecordConcept into an RnaStructFileOut object.

#### Parameters

`fileOut` | The RnaStructFileOut object to write into.
`record` | The RnaRecord object where 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 writeRecords(fileOut, contents);`

Write RnaStructContents into a RnaStructFileOut object.

#### Parameters

`fileOut` | The RnaStructFileOut object to write into.
`contents` | The RnaStructContents object where 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.

#### See Also

- writeHeader
- writeRecord

#### Dox Sources

    /*!
     * @class RnaStructFileOut
     *
     * @extends FormattedFileOut
     *
     * @headerfile <seqan/rna_io.h>
     *
     * @brief Class for writing DBN, DBV, CT, STH, BPSEQ, and EBPSEQ files
     *        containing RNA structures.
     *
     * @signature typedef FormattedFile<RnaStruct, Output> RnaStructFileOut;
     *
     * @fn RnaStructFileOut#writeRecord
     *
     * @brief Write one @link FormattedFileRecordConcept @endlink into an @link
     *        RnaStructFileOut @endlink object.
     *
     * @signature void writeRecord(fileOut, record);
     *
     * @param[in,out] fileOut The @link RnaStructFileOut @endlink object to write
     *                        into.
     * @param[in] record The @link RnaRecord @endlink object where to read from.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @fn RnaStructFileOut#writeHeader
     *
     * @brief Write one @link FormattedFileHeaderConcept @endlink into an @link
     *        RnaStructFileOut @endlink object.
     *
     * @signature void writeHeader(fileOut, header);
     *
     * @param[in,out] fileOut The @link RnaStructFileOut @endlink object to write
     *                        into.
     * @param[in] record The @link RnaHeader @endlink object where to read from.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @fn RnaStructFileOut#writeRecords
     *
     * @brief Write @link RnaStructContents @endlink into a @link RnaStructFileOut
     *        @endlink object.
     *
     * @signature void writeRecords(fileOut, contents);
     *
     * @param[in,out] fileOut The @link RnaStructFileOut @endlink object to write
     *                        into.
     * @param[in] contents The @link RnaStructContents @endlink object where to read
     *                     from.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @see RnaStructFileOut#writeRecord
     * @see RnaStructFileOut#writeHeader
     */