bpp-seq3  3.0.0
ProteicAlphabetState.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_ALPHABET_PROTEICALPHABETSTATE_H
6 #define BPP_SEQ_ALPHABET_PROTEICALPHABETSTATE_H
7 
8 
9 // From the STL
10 #include <string>
11 
12 namespace bpp
13 {
20 {
21 private:
22  std::string abbr_;
23 
24 public:
25  ProteicAlphabetState(int num, const std::string& letter, const std::string& abbr, const std::string& name) : AlphabetState(num, letter, name), abbr_(abbr) {}
26 
27  // Class destructor
28  virtual ~ProteicAlphabetState() {}
29 
30 public:
32  {
33  return new ProteicAlphabetState(*this);
34  }
40  const std::string& getAbbreviation() const { return abbr_; }
46  void setAbbreviation(const std::string& abbr) { abbr_ = abbr; }
47 };
48 }
49 #endif // BPP_SEQ_ALPHABET_PROTEICALPHABETSTATE_H
This is the base class to describe states in an Alphabet.
Definition: AlphabetState.h:22
This is the base class to describe states in a ProteicAlphabet.
ProteicAlphabetState(int num, const std::string &letter, const std::string &abbr, const std::string &name)
const std::string & getAbbreviation() const
Get the state's abbreviation.
void setAbbreviation(const std::string &abbr)
Set the state's abbreviation.
ProteicAlphabetState * clone() const
This alphabet is used to deal NumericAlphabet.