Back to index

texmacs  1.0.7.15
dictionary.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : dictionary.hpp
00004 * DESCRIPTION: used for translations and analysing text
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef DICTIONARY_H
00013 #define DICTIONARY_H
00014 #include "resource.hpp"
00015 #include "url.hpp"
00016 
00017 RESOURCE(dictionary);
00018 
00019 /******************************************************************************
00020 * The dictionary structure
00021 ******************************************************************************/
00022 
00023 class dictionary_rep: public rep<dictionary> {
00024   hashmap<string,string> table;
00025   string from, to;
00026 
00027 public:
00028   dictionary_rep (string from, string to);
00029 
00030   void   load (url fname);
00031   void   load (string fname);
00032   string translate (string s);
00033 };
00034 
00035 dictionary load_dictionary (string from, string to);
00036 void set_input_language (string s);
00037 string get_input_language ();
00038 void set_output_language (string s);
00039 string get_output_language ();
00040 
00041 string translate (string s, string from, string to);
00042 string translate (string s);
00043 string translate (const char* s);
00044 tree   tree_translate (tree t, string from, string to);
00045 tree   tree_translate (tree s);
00046 string translate (tree t, string from, string to);
00047 string translate (tree t);
00048 
00049 #endif // defined DICTIONARY_H