bpp-seq  2.2.0
bpp::OAlignment Class Referenceabstract

The OAlignment interface. More...

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

+ Inheritance diagram for bpp::OAlignment:
+ Collaboration diagram for bpp::OAlignment:

Public Member Functions

 OAlignment ()
 
virtual ~OAlignment ()
 
virtual void writeAlignment (std::ostream &output, const SiteContainer &sc) const =0 throw (Exception)
 Write a container to a stream. More...
 
virtual void writeAlignment (const std::string &path, const SiteContainer &sc, bool overwrite) const =0 throw (Exception)
 Write a container to a file. More...
 
const std::string getDataType () const
 

Detailed Description

The OAlignment interface.

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

Definition at line 95 of file OSequence.h.

Constructor & Destructor Documentation

◆ OAlignment()

bpp::OAlignment::OAlignment ( )
inline

Definition at line 99 of file OSequence.h.

◆ ~OAlignment()

virtual bpp::OAlignment::~OAlignment ( )
inlinevirtual

Definition at line 100 of file OSequence.h.

Member Function Documentation

◆ getDataType()

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

Definition at line 65 of file IoSequence.h.

◆ writeAlignment() [1/2]

virtual void bpp::OAlignment::writeAlignment ( std::ostream &  output,
const SiteContainer sc 
) const
throw (Exception
)
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::Phylip, bpp::Clustal, bpp::AbstractOSequence, bpp::Stockholm, and bpp::AbstractOAlignment.

◆ writeAlignment() [2/2]

virtual void bpp::OAlignment::writeAlignment ( const std::string &  path,
const SiteContainer sc,
bool  overwrite 
) const
throw (Exception
)
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::Phylip, bpp::Clustal, bpp::AbstractOSequence, bpp::Stockholm, and bpp::AbstractOAlignment.


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