Back to index

texmacs  1.0.7.15
Classes | Functions
dictionary.hpp File Reference
#include "resource.hpp"
#include "url.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dictionary_rep

Functions

 RESOURCE (dictionary)
dictionary load_dictionary (string from, string to)
void set_input_language (string s)
string get_input_language ()
void set_output_language (string s)
string get_output_language ()
string translate (string s, string from, string to)
string translate (string s)
string translate (const char *s)
tree tree_translate (tree t, string from, string to)
tree tree_translate (tree s)
string translate (tree t, string from, string to)
string translate (tree t)

Function Documentation

Definition at line 136 of file dictionary.cpp.

{ return in_lan; }

Here is the caller graph for this function:

Definition at line 138 of file dictionary.cpp.

{ return out_lan; }

Here is the caller graph for this function:

dictionary load_dictionary ( string  from,
string  to 
)

Definition at line 64 of file dictionary.cpp.

                                         {
  string name= from * "-" * to;
  if (dictionary::instances -> contains (name))
    return dictionary (name);
  dictionary dict= tm_new<dictionary_rep> (from, to);
  if (from != to) dict->load (name);
  return dict;
}

Here is the call graph for this function:

Here is the caller graph for this function:

RESOURCE ( dictionary  )

Definition at line 135 of file dictionary.cpp.

{ in_lan= s; }

Here is the caller graph for this function:

Definition at line 137 of file dictionary.cpp.

{ out_lan= s; }

Here is the caller graph for this function:

string translate ( string  s,
string  from,
string  to 
)

Definition at line 141 of file dictionary.cpp.

                                             {
  if (N(from)==0) return s;
  dictionary dict= load_dictionary (from, to);
  return dict->translate (s);
}

Here is the call graph for this function:

Definition at line 148 of file dictionary.cpp.

                     {
  return translate (s, "english", out_lan);
}

Here is the call graph for this function:

string translate ( const char *  s)

Definition at line 153 of file dictionary.cpp.

                          {
  return translate (string (s), "english", out_lan);
}

Here is the call graph for this function:

string translate ( tree  t,
string  from,
string  to 
)

Definition at line 234 of file dictionary.cpp.

                                           {
  return serialize (tree_translate (t, from, to));
}

Here is the call graph for this function:

Definition at line 239 of file dictionary.cpp.

                   {
  return serialize (tree_translate (t));
}

Here is the call graph for this function:

tree tree_translate ( tree  t,
string  from,
string  to 
)

Definition at line 162 of file dictionary.cpp.

                                                {
  //cout << "Translating " << t << " from " << from << " into " << to << "\n";
  if (is_atomic (t))
    return translate (t->label, from, to);
  else if (is_compound (t, "verbatim", 1))
    return t[0];
  else if (is_compound (t, "localize", 1))
    return tree_translate (t[0], "english", out_lan);
  else if (is_compound (t, "render-key", 1))
    return compound ("render-key", tree_translate (t[0], from, to));
  else {
    tree r (t, N(t));
    for (int i=0; i<N(t); i++)
      if (!the_drd->is_accessible_child (t, i)) r[i]= t[i];
      else r[i]= tree_translate (t[i], from, to);
    return r;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 182 of file dictionary.cpp.

                        {
  return tree_translate (t, "english", out_lan);
}

Here is the call graph for this function: