bpp-seq3  3.0.0
bpp::IAlignment Class Referenceabstract

The IAlignment interface. More...

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

+ Inheritance diagram for bpp::IAlignment:
+ Collaboration diagram for bpp::IAlignment:

Public Member Functions

 IAlignment ()
 
virtual ~IAlignment ()
 
virtual void readAlignment (std::istream &input, SequenceContainerInterface &container) const =0
 Add the content of a stream to a new container. More...
 
virtual void readAlignment (const std::string &path, SequenceContainerInterface &container) const =0
 Create a new container from a file. More...
 
virtual std::unique_ptr< SiteContainerInterfacereadAlignment (std::istream &input, std::shared_ptr< const Alphabet > alpha) const =0
 Create a new container from a stream. More...
 
virtual std::unique_ptr< SiteContainerInterfacereadAlignment (const std::string &path, std::shared_ptr< const Alphabet > alpha) const =0
 Create a new container from 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 IAlignment interface.

This interface defines the basic methods for reading aligned sequences from a file.

Definition at line 85 of file ISequence.h.

Constructor & Destructor Documentation

◆ IAlignment()

bpp::IAlignment::IAlignment ( )
inline

Definition at line 89 of file ISequence.h.

◆ ~IAlignment()

virtual bpp::IAlignment::~IAlignment ( )
inlinevirtual

Definition at line 90 of file ISequence.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.

◆ readAlignment() [1/4]

virtual void bpp::IAlignment::readAlignment ( const std::string &  path,
SequenceContainerInterface container 
) const
pure virtual

Create a new container from a file.

Parameters
pathThe path to the file to read.
containerThe container where to add data. Needs not be a SiteContainer, as aligned sequences can be stored in a simple SequenceContainer.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractIAlignment.

◆ readAlignment() [2/4]

virtual std::unique_ptr<SiteContainerInterface> bpp::IAlignment::readAlignment ( const std::string &  path,
std::shared_ptr< const Alphabet alpha 
) const
pure virtual

Create a new container from a file.

Parameters
pathThe path to the file to read.
alphaThe alphabet to be associated to the container.
Returns
A new SiteContainer object.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractIAlignment.

◆ readAlignment() [3/4]

virtual void bpp::IAlignment::readAlignment ( std::istream &  input,
SequenceContainerInterface container 
) const
pure virtual

Add the content of a stream to a new container.

Parameters
inputThe input stream to read.
containerThe container where to add data. Needs not be a SiteContainer, as aligned sequences can be stored in a simple SequenceContainer.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractIAlignment.

◆ readAlignment() [4/4]

virtual std::unique_ptr<SiteContainerInterface> bpp::IAlignment::readAlignment ( std::istream &  input,
std::shared_ptr< const Alphabet alpha 
) const
pure virtual

Create a new container from a stream.

Parameters
inputThe input stream to read.
alphaThe alphabet to be associated to the container.
Returns
A new SiteContainer object.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractIAlignment.


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