Back to index

texmacs  1.0.7.15
Classes | Functions
charmap.cpp File Reference
#include "charmap.hpp"
#include "translator.hpp"
#include "analyze.hpp"

Go to the source code of this file.

Classes

struct  ec_charmap_rep
struct  range_charmap_rep
struct  explicit_charmap_rep
struct  join_charmap_rep

Functions

 RESOURCE_CODE (charmap)
charmap any_charmap ()
charmap ec_charmap ()
charmap range_charmap (int start, int end)
charmap la_charmap ()
charmap hangul_charmap ()
charmap oriental_charmap ()
charmap explicit_charmap (string name)
string join_name (charmap *a, int n)
charmap join_charmap (charmap *a, int n)
charmap load_charmap (tree def)

Function Documentation

charmap any_charmap ( )

Definition at line 61 of file charmap.cpp.

               {
  if (charmap::instances -> contains ("any"))
    return charmap ("any");
  return make (charmap, "any", tm_new<charmap_rep> ("any"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap ec_charmap ( )

Definition at line 80 of file charmap.cpp.

              {
  if (charmap::instances -> contains ("ec"))
    return charmap ("ec");
  return make (charmap, "ec", tm_new<ec_charmap_rep> ());
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap explicit_charmap ( string  name)

Definition at line 134 of file charmap.cpp.

                               {
  if (charmap::instances -> contains (name))
    return charmap (name);
  return make (charmap, name, tm_new<explicit_charmap_rep> (name));
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap hangul_charmap ( )

Definition at line 114 of file charmap.cpp.

                  {
  return range_charmap (0xac00, 0xd7a3);
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap join_charmap ( charmap *  a,
int  n 
)

Definition at line 189 of file charmap.cpp.

                                 {
  string name= join_name (a, n);
  if (charmap::instances -> contains (name))
    return charmap (name);
  return make (charmap, name, tm_new<join_charmap_rep> (a, n));
}

Here is the call graph for this function:

Here is the caller graph for this function:

string join_name ( charmap *  a,
int  n 
)

Definition at line 145 of file charmap.cpp.

                              {
  string acc= copy (a[0]->res_name);
  for (int i=1; i<n; i++)
    acc << ":" << a[i]->res_name;
  return acc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap la_charmap ( )

Definition at line 109 of file charmap.cpp.

              {
  return range_charmap (0x400, 0x4ff);
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap load_charmap ( tree  def)

Definition at line 201 of file charmap.cpp.

                        {
  int i, n= N (def);
  charmap* a= tm_new_array<charmap> (n);
  for (i=0; i<n; i++) {
    //cout << i << "\t" << def[i] << "\n";
    if (def[i] == "any") a[i]= any_charmap ();
    else if (def[i] == "ec") a[i]= ec_charmap ();
    else if (def[i] == "hangul") a[i]= hangul_charmap ();
    else if (def[i] == "la") a[i]= la_charmap ();
    else if (def[i] == "oriental") a[i]= oriental_charmap ();
    else a[i]= explicit_charmap (as_string (def[i]));
  }
  return join_charmap (a, n);
}

Here is the call graph for this function:

charmap oriental_charmap ( )

Definition at line 119 of file charmap.cpp.

                    {
  return range_charmap (0x3000, 0xffff);
}

Here is the call graph for this function:

Here is the caller graph for this function:

charmap range_charmap ( int  start,
int  end 
)

Definition at line 102 of file charmap.cpp.

                                   {
  string name= as_hexadecimal (start) * "--" * as_hexadecimal (end);
  if (charmap::instances -> contains (name)) return charmap (name);
  return make (charmap, name, tm_new<range_charmap_rep> (start, end));
}

Here is the call graph for this function:

Here is the caller graph for this function:

RESOURCE_CODE ( charmap  )