A library for working with phylogenetic and population genetic data.
FastaOutputIterator Class Reference

#include <genesis/sequence/formats/fasta_output_iterator.hpp>

Detailed Description

Write Fasta data, sequentially.

This class allows to write Sequence data to an output target, using Fasta format, without the need to have a full SequenceSet containing all Sequences in memory.

Exemplary usage:

auto out_it = FastaOutputIterator( utils::to_file( "path/to/out.fasta" ));
while( ... ) {
    Sequence seq = ...
    out_it << seq;

See the output target convenience functions utils::to_file(), utils::to_stream(), and utils::to_string() for examples of how to obtain a suitable output target.

Definition at line 66 of file fasta_output_iterator.hpp.

Public Member Functions

 FastaOutputIterator ()=delete
 FastaOutputIterator (self_type &&)=default
 FastaOutputIterator (self_type const &)=default
 FastaOutputIterator (std::shared_ptr< utils::BaseOutputTarget > target)
 FastaOutputIterator (std::shared_ptr< utils::BaseOutputTarget > target, FastaWriter const &writer)
 ~FastaOutputIterator ()=default
self_typeoperator<< (Sequence const &seq)
self_typeoperator= (self_type &&)=default
self_typeoperator= (self_type const &)=default
FastaWriterwriter ()
 Return the FastaWriter used for this iterator. More...

Public Types

using self_type = FastaOutputIterator

Constructor & Destructor Documentation

◆ FastaOutputIterator() [1/5]

FastaOutputIterator ( )

◆ FastaOutputIterator() [2/5]

FastaOutputIterator ( std::shared_ptr< utils::BaseOutputTarget target)

Definition at line 82 of file fasta_output_iterator.hpp.

◆ FastaOutputIterator() [3/5]

FastaOutputIterator ( std::shared_ptr< utils::BaseOutputTarget target,
FastaWriter const &  writer 

Definition at line 87 of file fasta_output_iterator.hpp.

◆ ~FastaOutputIterator()

~FastaOutputIterator ( )

◆ FastaOutputIterator() [4/5]

FastaOutputIterator ( self_type const &  )

◆ FastaOutputIterator() [5/5]

FastaOutputIterator ( self_type &&  )

Member Function Documentation

◆ operator<<()

self_type& operator<< ( Sequence const &  seq)

Definition at line 104 of file fasta_output_iterator.hpp.

◆ operator=() [1/2]

self_type& operator= ( self_type &&  )

◆ operator=() [2/2]

self_type& operator= ( self_type const &  )

◆ writer()

FastaWriter& writer ( )

Return the FastaWriter used for this iterator.

Use this to change the settings and writing behaviour of the iterator. See FastaWriter for details.

Definition at line 116 of file fasta_output_iterator.hpp.

Member Typedef Documentation

◆ self_type

Definition at line 74 of file fasta_output_iterator.hpp.

The documentation for this class was generated from the following file: