bpp-seq3  3.0.0
bpp::ProteicAlphabetState Class Reference

This is the base class to describe states in a ProteicAlphabet. More...

#include <Bpp/Seq/Alphabet/ProteicAlphabetState.h>

+ Inheritance diagram for bpp::ProteicAlphabetState:
+ Collaboration diagram for bpp::ProteicAlphabetState:

Public Member Functions

 ProteicAlphabetState (int num, const std::string &letter, const std::string &abbr, const std::string &name)
 
virtual ~ProteicAlphabetState ()
 
ProteicAlphabetStateclone () const
 
const std::string & getAbbreviation () const
 Get the state's abbreviation. More...
 
void setAbbreviation (const std::string &abbr)
 Set the state's abbreviation. More...
 
int getNum () const
 Get the state's number. More...
 
void setNum (int num)
 Set the state's number. More...
 
const std::string & getLetter () const
 Get the letter(s) corresponding to the state. More...
 
void setLetter (const std::string &letter)
 Set the letter(s) of the state. More...
 
const std::string & getName () const
 Get the name of the state. More...
 
void setName (const std::string &name)
 Set the name of the state. More...
 
bool operator== (AlphabetState &l2)
 operator == More...
 

Private Attributes

std::string abbr_
 
int num_
 
std::string letter_
 
std::string name_
 

Detailed Description

This is the base class to describe states in a ProteicAlphabet.

Author
Sylvain Gaillard

Definition at line 19 of file ProteicAlphabetState.h.

Constructor & Destructor Documentation

◆ ProteicAlphabetState()

bpp::ProteicAlphabetState::ProteicAlphabetState ( int  num,
const std::string &  letter,
const std::string &  abbr,
const std::string &  name 
)
inline

Definition at line 25 of file ProteicAlphabetState.h.

Referenced by clone().

◆ ~ProteicAlphabetState()

virtual bpp::ProteicAlphabetState::~ProteicAlphabetState ( )
inlinevirtual

Definition at line 28 of file ProteicAlphabetState.h.

Member Function Documentation

◆ clone()

ProteicAlphabetState* bpp::ProteicAlphabetState::clone ( ) const
inlinevirtual

Reimplemented from bpp::AlphabetState.

Definition at line 31 of file ProteicAlphabetState.h.

References ProteicAlphabetState().

◆ getAbbreviation()

const std::string& bpp::ProteicAlphabetState::getAbbreviation ( ) const
inline

Get the state's abbreviation.

Returns
The state's abbreviation.

Definition at line 40 of file ProteicAlphabetState.h.

References abbr_.

◆ getLetter()

const std::string& bpp::AlphabetState::getLetter ( ) const
inlineinherited

Get the letter(s) corresponding to the state.

The letter is a string because it may more than one char (for instance: codon).

Returns
The state's letter.

Definition at line 63 of file AlphabetState.h.

References bpp::AlphabetState::letter_.

Referenced by bpp::CaseMaskedAlphabet::CaseMaskedAlphabet(), bpp::LexicalAlphabet::getAlphabetType(), bpp::AbstractAlphabet::getCharCodeAt(), bpp::RNY::intToChar(), bpp::LetterAlphabet::registerState(), bpp::LetterAlphabet::setState(), and bpp::AbstractAlphabet::updateMaps_().

◆ getName()

const std::string& bpp::AlphabetState::getName ( ) const
inlineinherited

Get the name of the state.

Returns
The full name of the state (i.e. Adenine).

Definition at line 76 of file AlphabetState.h.

References bpp::AlphabetState::name_.

Referenced by bpp::CaseMaskedAlphabet::CaseMaskedAlphabet(), and bpp::WordAlphabet::getName().

◆ getNum()

◆ operator==()

bool bpp::AlphabetState::operator== ( AlphabetState l2)
inlineinherited

operator ==

Comparison is done on state num

Definition at line 89 of file AlphabetState.h.

References bpp::AlphabetState::getNum().

◆ setAbbreviation()

void bpp::ProteicAlphabetState::setAbbreviation ( const std::string &  abbr)
inline

Set the state's abbreviation.

Parameters
abbrThe state's abbreviation.

Definition at line 46 of file ProteicAlphabetState.h.

References abbr_.

◆ setLetter()

void bpp::AlphabetState::setLetter ( const std::string &  letter)
inlineinherited

Set the letter(s) of the state.

Parameters
letterThe state's letter.

Definition at line 69 of file AlphabetState.h.

References bpp::AlphabetState::letter_.

◆ setName()

void bpp::AlphabetState::setName ( const std::string &  name)
inlineinherited

Set the name of the state.

Parameters
nameThe state's name

Definition at line 82 of file AlphabetState.h.

References bpp::AlphabetState::name_.

◆ setNum()

void bpp::AlphabetState::setNum ( int  num)
inlineinherited

Set the state's number.

Parameters
numThe state's number.

Definition at line 53 of file AlphabetState.h.

References bpp::AlphabetState::num_.

Member Data Documentation

◆ abbr_

std::string bpp::ProteicAlphabetState::abbr_
private

Definition at line 22 of file ProteicAlphabetState.h.

Referenced by getAbbreviation(), and setAbbreviation().

◆ letter_

std::string bpp::AlphabetState::letter_
privateinherited

Definition at line 25 of file AlphabetState.h.

Referenced by bpp::AlphabetState::getLetter(), and bpp::AlphabetState::setLetter().

◆ name_

std::string bpp::AlphabetState::name_
privateinherited

Definition at line 26 of file AlphabetState.h.

Referenced by bpp::AlphabetState::getName(), and bpp::AlphabetState::setName().

◆ num_

int bpp::AlphabetState::num_
privateinherited

Definition at line 24 of file AlphabetState.h.

Referenced by bpp::AlphabetState::getNum(), and bpp::AlphabetState::setNum().


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