Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef IDIOMA_HH
- #define IDIOMA_HH
- #include "BinTree.hh"
- #ifndef NO_DIAGRAM
- #include <iostream> //includes que no quiero que salgan en el doxygen
- #include <string>
- #include <map>
- #include <set>
- #include <iterator>
- #endif
- using namespace std;
- class idioma {
- public:
- idioma();
- string nombre() const;
- string codifica(const string& palabra);
- string decodifica(string& palabra);
- void leer();
- void imprimir_tabla() const;
- void imprimir_codigos() const;
- void imprimir_treecode() const;
- map<string,int> consultar_tabla() const;
- map<char,string> consultar_codigos() const;
- BinTree< pair<string,int> > consultar_treecode() const;
- private:
- void crear_treecode();
- void crear_codigos(const BinTree < pair<string,int> >& arbol, string code);
- void imprimir_treecode_rec(const BinTree < pair<string,int> >& arbol) const;
- BinTree< pair<string,int> > treecode;
- map<string,int> tabla;
- map<char,string> codigos;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment