bpp-seq
2.2.0
|
Partial implementation of the Transliterator interface. More...
#include <Bpp/Seq/Transliterator.h>
Public Member Functions | |
AbstractTransliterator () | |
virtual | ~AbstractTransliterator () |
virtual int | translate (int state) const =0 throw (BadIntException, Exception) |
Translate a given state coded as a int from source alphabet to target alphabet. More... | |
virtual std::string | translate (const std::string &state) const =0 throw (BadCharException, Exception) |
Translate a given state coded as a string from source alphabet to target alphabet. More... | |
virtual Sequence * | translate (const Sequence &sequence) const throw (AlphabetMismatchException, Exception) |
Translate a whole sequence from source alphabet to target alphabet. More... | |
virtual const Alphabet * | getSourceAlphabet () const =0 |
Get the source alphabet. More... | |
virtual const Alphabet * | getTargetAlphabet () const =0 |
Get the target alphabet. More... | |
Partial implementation of the Transliterator interface.
Definition at line 151 of file Transliterator.h.
|
inline |
Definition at line 155 of file Transliterator.h.
|
inlinevirtual |
Definition at line 156 of file Transliterator.h.
|
pure virtualinherited |
Get the source alphabet.
Implemented in bpp::AbstractReverseTransliterator, bpp::GeneticCode, bpp::NucleicAcidsReplication, and bpp::DNAToRNA.
|
pure virtualinherited |
Get the target alphabet.
Implemented in bpp::AbstractReverseTransliterator, bpp::GeneticCode, bpp::NucleicAcidsReplication, and bpp::DNAToRNA.
|
pure virtual |
Translate a given state coded as a int from source alphabet to target alphabet.
state | A state in source alphabet. |
BadIntException | If the state is not a proper state for source alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::Transliterator.
Implemented in bpp::GeneticCode, and bpp::DNAToRNA.
Referenced by bpp::DNAToRNA::translate(), and bpp::GeneticCode::translate().
|
pure virtual |
Translate a given state coded as a string from source alphabet to target alphabet.
state | A state in source alphabet. |
BadCharException | If the state is not a proper state for source alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::Transliterator.
Implemented in bpp::GeneticCode, and bpp::DNAToRNA.
|
virtual |
Translate a whole sequence from source alphabet to target alphabet.
sequence | A sequence in source alphabet. |
AlphabetMismatchException | If the sequence alphabet do not match the source alphabet. |
Exception | Other kind of error, depending on the implementation. |
Implements bpp::Transliterator.
Reimplemented in bpp::GeneticCode, and bpp::DNAToRNA.
Definition at line 44 of file Transliterator.cpp.
References bpp::SymbolList::addElement(), bpp::BasicSymbolList::getAlphabet(), and bpp::Alphabet::getGapCharacterCode().