csansoon

idioma.hh

Apr 10th, 2019
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.07 KB | None | 0 0
  1. #ifndef IDIOMA_HH
  2. #define IDIOMA_HH
  3.  
  4.  
  5. #include "BinTree.hh"
  6.  
  7. #ifndef NO_DIAGRAM
  8. #include <iostream> //includes que no quiero que salgan en el doxygen
  9. #include <string>
  10. #include <map>
  11. #include <set>
  12. #include <iterator>
  13. #endif
  14. using namespace std;
  15.  
  16. class idioma {
  17.    
  18. public:
  19.  
  20.     idioma();
  21.    
  22.     string nombre() const;
  23.  
  24.     string codifica(const string& palabra);
  25.     string decodifica(string& palabra);
  26.    
  27.     void leer();
  28.    
  29.     void imprimir_tabla() const;
  30.     void imprimir_codigos() const;
  31.     void imprimir_treecode() const;
  32.    
  33.     map<string,int> consultar_tabla() const;
  34.     map<char,string> consultar_codigos() const;
  35.     BinTree< pair<string,int> > consultar_treecode() const;
  36.    
  37.    
  38. private:
  39.    
  40.     void crear_treecode();
  41.     void crear_codigos(const BinTree < pair<string,int> >& arbol, string code);
  42.    
  43.     void imprimir_treecode_rec(const BinTree < pair<string,int> >& arbol) const;
  44.    
  45.     BinTree< pair<string,int> > treecode;
  46.     map<string,int> tabla;
  47.     map<char,string> codigos;
  48.    
  49.    
  50.    
  51. };
  52. #endif
Advertisement
Add Comment
Please, Sign In to add comment