bpp-seq3  3.0.0
bpp::AbstractOAlignment Class Referenceabstract

Partial implementation of the OAlignment interface. More...

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

+ Inheritance diagram for bpp::AbstractOAlignment:
+ Collaboration diagram for bpp::AbstractOAlignment:

Public Member Functions

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

Detailed Description

Partial implementation of the OAlignment interface.

Definition at line 22 of file AbstractOAlignment.h.

Constructor & Destructor Documentation

◆ AbstractOAlignment()

bpp::AbstractOAlignment::AbstractOAlignment ( )
inline

Definition at line 26 of file AbstractOAlignment.h.

◆ ~AbstractOAlignment()

virtual bpp::AbstractOAlignment::~AbstractOAlignment ( )
inlinevirtual

Definition at line 27 of file AbstractOAlignment.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.

◆ writeAlignment() [1/2]

void bpp::AbstractOAlignment::writeAlignment ( const std::string &  path,
const SiteContainerInterface 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::OAlignment.

Reimplemented in bpp::Stockholm, bpp::Clustal, and bpp::Phylip.

Definition at line 37 of file AbstractOAlignment.h.

References writeAlignment().

◆ writeAlignment() [2/2]

void bpp::AbstractOAlignment::writeAlignment ( std::ostream &  output,
const SiteContainerInterface 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::OAlignment.

Implemented in bpp::Stockholm, bpp::Phylip, and bpp::Clustal.

Referenced by bpp::Phylip::writeAlignment(), writeAlignment(), bpp::Clustal::writeAlignment(), and bpp::Stockholm::writeAlignment().


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