bpp-core3  3.0.0
NucleicAlphabetState.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_NUCLEICALPHABETSTATE_H
6 #define BPP_SEQ_ALPHABET_NUCLEICALPHABETSTATE_H
7 
8 
9 // From the STL
10 #include <string>
11 #include <bitset>
12 
13 namespace bpp
14 {
53 {
54 private:
55  int binCode_;
56 
57 public:
58  NucleicAlphabetState(int num, const std::string& letter, unsigned char code, const std::string& name) :
59  AlphabetState(num, letter, name), binCode_(code) {}
60 
61  // Class destructor
62  virtual ~NucleicAlphabetState() {}
63 
64 public:
66  {
67  return new NucleicAlphabetState(*this);
68  }
74  int getBinaryCode() const { return binCode_; }
80  void setBinaryCode(int code) { binCode_ = code; }
81 };
82 }
83 #endif // BPP_SEQ_ALPHABET_NUCLEICALPHABETSTATE_H
This is the base class to describe states in an Alphabet.
Definition: AlphabetState.h:21
This alphabet is used to deal NumericAlphabet.
int getBinaryCode() const
Get the state&#39;s binary representation.
NucleicAlphabetState(int num, const std::string &letter, unsigned char code, const std::string &name)
This is the base class to describe states in a NucleicAlphabet.
NucleicAlphabetState * clone() const
void setBinaryCode(int code)
Set the state&#39;s binary representation.