bpp-seq3  3.0.0
bpp::AbstractOSequence Class Referenceabstract

Partial implementation of the OSequence interface. More...

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

+ Inheritance diagram for bpp::AbstractOSequence:
+ Collaboration diagram for bpp::AbstractOSequence:

Public Member Functions

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

Detailed Description

Partial implementation of the OSequence interface.

Definition at line 23 of file AbstractOSequence.h.

Constructor & Destructor Documentation

◆ AbstractOSequence()

bpp::AbstractOSequence::AbstractOSequence ( )
inline

Definition at line 27 of file AbstractOSequence.h.

◆ ~AbstractOSequence()

virtual bpp::AbstractOSequence::~AbstractOSequence ( )
inlinevirtual

Definition at line 28 of file AbstractOSequence.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]

void bpp::AbstractOSequence::writeSequences ( const std::string &  path,
const SequenceContainerInterface sc,
bool  overwrite = true 
) const
inlineoverridevirtual

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.

Implements bpp::OSequence.

Reimplemented in bpp::Mase, and bpp::Fasta.

Definition at line 38 of file AbstractOSequence.h.

References writeSequences().

◆ writeSequences() [2/2]

void bpp::AbstractOSequence::writeSequences ( std::ostream &  output,
const SequenceContainerInterface sc 
) const
overridepure 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.

Implements bpp::OSequence.

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

Referenced by bpp::AbstractOSequence2::writeAlignment(), writeSequences(), bpp::Fasta::writeSequences(), and bpp::Mase::writeSequences().


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