bpp-seq3  3.0.0
bpp::ISequence Class Referenceabstract

The ISequence interface. More...

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

+ Inheritance diagram for bpp::ISequence:
+ Collaboration diagram for bpp::ISequence:

Public Member Functions

 ISequence ()
 
virtual ~ISequence ()
 
virtual void readSequences (std::istream &input, SequenceContainerInterface &container) const =0
 Create a new container from a stream. More...
 
virtual void readSequences (const std::string &path, SequenceContainerInterface &container) const =0
 Create a new container from a file. More...
 
virtual std::unique_ptr< SequenceContainerInterfacereadSequences (std::istream &input, std::shared_ptr< const Alphabet > alpha) const =0
 Create a new container from a stream. More...
 
virtual std::unique_ptr< SequenceContainerInterfacereadSequences (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 ISequence interface.

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

Definition at line 27 of file ISequence.h.

Constructor & Destructor Documentation

◆ ISequence()

bpp::ISequence::ISequence ( )
inline

Definition at line 31 of file ISequence.h.

◆ ~ISequence()

virtual bpp::ISequence::~ISequence ( )
inlinevirtual

Definition at line 32 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.

◆ readSequences() [1/4]

virtual void bpp::ISequence::readSequences ( 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.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractISequence, and bpp::AbstractIAlignment2.

◆ readSequences() [2/4]

virtual std::unique_ptr<SequenceContainerInterface> bpp::ISequence::readSequences ( 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 SequenceContainer object.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::Phylip, bpp::DCSE, bpp::Clustal, bpp::AbstractISequence, and bpp::AbstractIAlignment2.

◆ readSequences() [3/4]

virtual void bpp::ISequence::readSequences ( std::istream &  input,
SequenceContainerInterface container 
) const
pure virtual

Create a new container from a stream.

Parameters
inputThe input stream to read.
containerThe container where to add data.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::AbstractISequence, and bpp::AbstractIAlignment2.

◆ readSequences() [4/4]

virtual std::unique_ptr<SequenceContainerInterface> bpp::ISequence::readSequences ( 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 SequenceContainer object.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::Phylip, bpp::DCSE, bpp::Clustal, bpp::AbstractISequence, and bpp::AbstractIAlignment2.


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