bpp-seq3  3.0.0
bpp::OSequence Class Referenceabstract

The OSequence interface. More...

#include <Bpp/Seq/Io/OSequence.h>

+ Inheritance diagram for bpp::OSequence:
+ Collaboration diagram for bpp::OSequence:

Public Member Functions

 OSequence ()
 
virtual ~OSequence ()
 
virtual void writeSequences (std::ostream &output, const SequenceContainerInterface &sc) const =0
 Write a container to a stream. More...
 
virtual void writeSequences (const std::string &path, const SequenceContainerInterface &sc, bool overwrite) const =0
 Write a container to a file. More...
 
const std::string getDataType () const
 
virtual const std::string getFormatName () const=0
 
virtual const std::string getFormatDescription () const=0
 

Detailed Description

The OSequence interface.

This interface defines the basic methods for writing sequences to a file.

Definition at line 21 of file OSequence.h.

Constructor & Destructor Documentation

◆ OSequence()

bpp::OSequence::OSequence ( )
inline

Definition at line 25 of file OSequence.h.

◆ ~OSequence()

virtual bpp::OSequence::~OSequence ( )
inlinevirtual

Definition at line 26 of file OSequence.h.

Member Function Documentation

◆ getDataType()

const std::string bpp::IOSequence::getDataType ( ) const
inlinevirtualinherited

Implements bpp::IOFormat.

Reimplemented in bpp::Pasta.

Definition at line 29 of file IoSequence.h.

◆ writeSequences() [1/2]

virtual void bpp::OSequence::writeSequences ( const std::string &  path,
const SequenceContainerInterface sc,
bool  overwrite 
) const
pure virtual

Write a container to a file.

Parameters
pathThe path to the file to write.
scThe container to write.
overwriteIf true the sequences are written at the beginning of the file instead of being appended. Any previous content will be lost.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::Mase, bpp::Fasta, and bpp::AbstractOSequence.

◆ writeSequences() [2/2]

virtual void bpp::OSequence::writeSequences ( std::ostream &  output,
const SequenceContainerInterface sc 
) const
pure virtual

Write a container to a stream.

Parameters
outputThe output stream where to write.
scThe container to write.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractOSequence, bpp::Pasta, bpp::Mase, and bpp::Fasta.


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