bpp-seq3
3.0.0
|
Partial implementation of the ISequence interface. More...
#include <Bpp/Seq/Io/AbstractISequence.h>
Public Member Functions | |
AbstractISequence () | |
virtual | ~AbstractISequence () |
const std::string | getDataType () const |
virtual const std::string | getFormatName () const=0 |
virtual const std::string | getFormatDescription () const=0 |
ISequence methods: | |
void | readSequences (std::istream &input, SequenceContainerInterface &sc) const override |
Add sequences to a container from a stream. More... | |
void | readSequences (const std::string &path, SequenceContainerInterface &sc) const override |
Add sequences to a container from a file. More... | |
std::unique_ptr< SequenceContainerInterface > | readSequences (std::istream &input, std::shared_ptr< const Alphabet > alpha) const override |
Create a new container from a stream. More... | |
std::unique_ptr< SequenceContainerInterface > | readSequences (const std::string &path, std::shared_ptr< const Alphabet > alpha) const override |
Create a new container from a file. More... | |
Protected Member Functions | |
virtual void | appendSequencesFromStream (std::istream &input, SequenceContainerInterface &sc) const =0 |
Append sequences to a container from a stream. More... | |
virtual void | appendSequencesFromFile (const std::string &path, SequenceContainerInterface &sc) const |
Append sequences to a container from a file. More... | |
std::unique_ptr< SequenceContainerInterface > | readSequencesFromStream (std::istream &input, std::shared_ptr< const Alphabet > &alpha) const |
Read sequences from a stream. More... | |
std::unique_ptr< SequenceContainerInterface > | readSequencesFromFile (const std::string &path, std::shared_ptr< const Alphabet > &alpha) const |
Append sequences to a container from a file. More... | |
Partial implementation of the ISequence interface.
Definition at line 23 of file AbstractISequence.h.
|
inline |
Definition at line 27 of file AbstractISequence.h.
|
inlinevirtual |
Definition at line 28 of file AbstractISequence.h.
|
inlineprotectedvirtual |
Append sequences to a container from a file.
path | The path to the file to read. |
sc | The sequence container to update. |
Exception | If the file is not in the specified format. |
Definition at line 92 of file AbstractISequence.h.
References appendSequencesFromStream().
Referenced by readSequences(), and readSequencesFromFile().
|
protectedpure virtual |
Append sequences to a container from a stream.
This is the unique method to implement!
input | The input stream to read. |
sc | The sequence container to update. |
Exception | If the file is not in the specified format. |
Implemented in bpp::Mase, bpp::Fasta, and bpp::GenBank.
Referenced by appendSequencesFromFile(), readSequences(), and readSequencesFromStream().
|
inlinevirtualinherited |
|
inlineoverridevirtual |
Add sequences to a container from a file.
path | The path to the file to read. |
sc | The sequence container to update. |
Exception | If the file is not in the specified format. |
Implements bpp::ISequence.
Definition at line 57 of file AbstractISequence.h.
References appendSequencesFromFile().
|
inlineoverridevirtual |
Create a new container from a file.
path | The path to the file to read. |
alpha | The alphabet to be associated to the container. |
Exception | If the file is not in the specified format. |
Implements bpp::ISequence.
Definition at line 67 of file AbstractISequence.h.
References readSequencesFromFile().
|
inlineoverridevirtual |
Add sequences to a container from a stream.
input | The input stream to read. |
sc | The sequence container to update. |
Exception | If the file is not in the specified format. |
Implements bpp::ISequence.
Definition at line 45 of file AbstractISequence.h.
References appendSequencesFromStream().
Referenced by bpp::Mase::readMeta().
|
inlineoverridevirtual |
Create a new container from a stream.
input | The input stream to read. |
alpha | The alphabet to be associated to the container. |
Exception | If the file is not in the specified format. |
Implements bpp::ISequence.
Definition at line 62 of file AbstractISequence.h.
References readSequencesFromStream().
|
inlineprotected |
Append sequences to a container from a file.
path | The path to the file to read. |
alpha | The alphabet to use. |
Exception | If the file is not in the specified format. |
Definition at line 123 of file AbstractISequence.h.
References appendSequencesFromFile().
Referenced by readSequences().
|
inlineprotected |
Read sequences from a stream.
input | The input stream to read. |
alpha | The alphabet to use. |
Exception | If the file is not in the specified format. |
Definition at line 109 of file AbstractISequence.h.
References appendSequencesFromStream().
Referenced by readSequences().