bpp-seq  2.2.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 SequenceContainerreadSequences (std::istream &input, const Alphabet *alpha) const =0 throw (Exception)
 Create a new container from a stream. More...
 
virtual SequenceContainerreadSequences (const std::string &path, const Alphabet *alpha) const =0 throw (Exception)
 Create a new container from a file. More...
 
const std::string getDataType () const
 

Detailed Description

The ISequence interface.

This interface defines the basic methods for reading sequences from a file. NB: This interface is effective only if the VIRTUAL_COV option is enabled (default behavior).

Definition at line 64 of file ISequence.h.

Constructor & Destructor Documentation

◆ ISequence()

bpp::ISequence::ISequence ( )
inline

Definition at line 68 of file ISequence.h.

◆ ~ISequence()

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

Definition at line 69 of file ISequence.h.

Member Function Documentation

◆ getDataType()

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

Definition at line 65 of file IoSequence.h.

◆ readSequences() [1/2]

virtual SequenceContainer* bpp::ISequence::readSequences ( std::istream &  input,
const Alphabet alpha 
) const
throw (Exception
)
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::NexusIOSequence, bpp::AbstractISequence, bpp::Clustal, and bpp::DCSE.

◆ readSequences() [2/2]

virtual SequenceContainer* bpp::ISequence::readSequences ( const std::string &  path,
const Alphabet alpha 
) const
throw (Exception
)
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::AbstractISequence, bpp::NexusIOSequence, bpp::Clustal, and bpp::DCSE.


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