bpp-popgen
3.0.0
|
The AnalyzedSequences class. More...
#include <Bpp/PopGen/DataSet/AnalyzedSequences.h>
Public Member Functions | |
AnalyzedSequences () | |
AnalyzedSequences (const Alphabet *alpha) | |
~AnalyzedSequences () | |
AnalyzedSequences (const AnalyzedSequences &as) | |
AnalyzedSequences & | operator= (const AnalyzedSequences &as) |
void | setAlphabet (const Alphabet *alpha) |
Set the alphabet used for the sequences. More... | |
void | setAlphabet (const std::string &alpha_type) |
Set the alphabet used for the sequences by alphabet type. More... | |
const Alphabet * | getAlphabet () const |
Get the alphabet. More... | |
std::string | getAlphabetType () const |
Get the alphabet type as a string. More... | |
Private Member Functions | |
void | clear_ () |
Private Attributes | |
const Alphabet * | alphabet_ |
bool | autoset_ |
The AnalyzedSequences class.
This is a class to store info about the sequences.
The object stores a pointer toward a const Alphabet. The way the pointer is managed depend on the method used to set it.
If one use a method using a const Alphabet* to set the Alphabet, then he has to take care of the memory management (i.e. freeing the Alphabet object).
If one use a method that create an Alphabet object like those using a string description of the Alphabet then the AnalyzedSequences object will delete himself the Alphabet object on destruction.
Be carefull when copying an AnalyzedSequences object, the way that the Alphabet object is managed is also copyed then if the initial AnalyzedSequences takes care of its Alphabet member then the copy will hold copy af the Alphabet an manage it else the new AnalyzedSequences will just copy the pointer and it's up to the user to take care of its deletion.
Definition at line 73 of file AnalyzedSequences.h.
AnalyzedSequences::AnalyzedSequences | ( | ) |
Definition at line 48 of file AnalyzedSequences.cpp.
AnalyzedSequences::AnalyzedSequences | ( | const Alphabet * | alpha | ) |
Definition at line 51 of file AnalyzedSequences.cpp.
AnalyzedSequences::~AnalyzedSequences | ( | ) |
Definition at line 54 of file AnalyzedSequences.cpp.
References clear_().
AnalyzedSequences::AnalyzedSequences | ( | const AnalyzedSequences & | as | ) |
Definition at line 59 of file AnalyzedSequences.cpp.
References alphabet_, autoset_, getAlphabetType(), and setAlphabet().
|
private |
Definition at line 120 of file AnalyzedSequences.cpp.
References alphabet_, and autoset_.
Referenced by ~AnalyzedSequences().
|
inline |
Get the alphabet.
Definition at line 103 of file AnalyzedSequences.h.
References alphabet_.
Referenced by bpp::DataSet::getAlphabet().
std::string AnalyzedSequences::getAlphabetType | ( | ) | const |
Get the alphabet type as a string.
Definition at line 108 of file AnalyzedSequences.cpp.
References alphabet_, and bpp::Alphabet::getAlphabetType().
Referenced by AnalyzedSequences(), bpp::DataSet::getAlphabetType(), and operator=().
AnalyzedSequences & AnalyzedSequences::operator= | ( | const AnalyzedSequences & | as | ) |
Definition at line 73 of file AnalyzedSequences.cpp.
References alphabet_, autoset_, getAlphabetType(), and setAlphabet().
void AnalyzedSequences::setAlphabet | ( | const Alphabet * | alpha | ) |
Set the alphabet used for the sequences.
Definition at line 87 of file AnalyzedSequences.cpp.
References alphabet_, and autoset_.
Referenced by AnalyzedSequences(), operator=(), and bpp::DataSet::setAlphabet().
void AnalyzedSequences::setAlphabet | ( | const std::string & | alpha_type | ) |
Set the alphabet used for the sequences by alphabet type.
Definition at line 93 of file AnalyzedSequences.cpp.
|
private |
Definition at line 76 of file AnalyzedSequences.h.
Referenced by AnalyzedSequences(), clear_(), getAlphabet(), getAlphabetType(), operator=(), and setAlphabet().
|
private |
Definition at line 77 of file AnalyzedSequences.h.
Referenced by AnalyzedSequences(), clear_(), operator=(), and setAlphabet().