bpp-seq3  3.0.0
DefaultAlphabet.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #include <Bpp/Text/TextTools.h>
6 
7 #include "AlphabetState.h"
8 #include "DefaultAlphabet.h"
9 
10 using namespace bpp;
11 
13  chars_("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.?")
14 {
15  // Alphabet content definition
16  registerState(new AlphabetState(-1, "-", "Gap"));
17 
18  for (size_t i = 0; i < chars_.size(); i++)
19  {
20  registerState(new AlphabetState(static_cast<int>(i), TextTools::toString(chars_[i]), ""));
21  }
22 }
This is the base class to describe states in an Alphabet.
Definition: AlphabetState.h:22
void registerState(AlphabetState *st)
Add a state to the Alphabet.
std::string toString(T t)
This alphabet is used to deal NumericAlphabet.