Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes
verb_language_rep Struct Reference

#include <impl_language.hpp>

Inheritance diagram for verb_language_rep:
Inheritance graph
[legend]
Collaboration diagram for verb_language_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 verb_language_rep (string name)
text_property advance (tree t, int &pos)
array< int > get_hyphens (string s)
void hyphenate (string s, int after, string &left, string &right)
string get_color (tree t, int start, int end)
virtual string get_group (string s)
virtual array< stringget_members (string s)
virtual void highlight (tree t)

Public Attributes

string lan_name
int hl_lan
string res_name

Detailed Description

Definition at line 24 of file impl_language.hpp.


Constructor & Destructor Documentation

Definition at line 17 of file verb_language.cpp.

Here is the call graph for this function:


Member Function Documentation

text_property verb_language_rep::advance ( tree  t,
int &  pos 
) [virtual]

Implements language_rep.

Definition at line 24 of file verb_language.cpp.

                                            {
  string s= t->label;
  if (pos==N(s)) return &tp_normal_rep;
  if (s[pos]==' ') {
    pos++;
    return &tp_space_rep;
  }
  if (s[pos]=='-') {
    pos++;
    return &tp_hyph_rep;
  }

  array<int> cols= obtain_highlight (t, hl_lan);
  if (N(cols) == 0)
    while ((pos<N(s)) && (s[pos]!=' ') && (s[pos]!='-')) pos++;
  else if ((pos<N(s)) && (s[pos]!=' ') && (s[pos]!='-')) {
    pos++;
    while ((pos<N(s)) && (s[pos]!=' ') && (s[pos]!='-') &&
          cols[pos] == cols[pos-1]) pos++;
  }
  return &tp_normal_rep;
}

Here is the call graph for this function:

string verb_language_rep::get_color ( tree  t,
int  start,
int  end 
) [virtual]

Reimplemented from language_rep.

Definition at line 65 of file verb_language.cpp.

                                                        {
  if (start >= end) return "";
  array<int> cols= obtain_highlight (t, hl_lan);
  if (start < N(cols) && cols[start] != 0)
    return decode_color (cols[start]);
  return "";
}

Here is the call graph for this function:

string language_rep::get_group ( string  s) [virtual, inherited]

Reimplemented in math_language_rep.

Definition at line 150 of file language.cpp.

                                 {
  (void) s;
  return "default";
}
array< int > verb_language_rep::get_hyphens ( string  s) [virtual]

Implements language_rep.

Definition at line 48 of file verb_language.cpp.

                                        {
  int i;
  array<int> penalty (N(s)+1);
  for (i=0; i<N(penalty); i++) penalty[i]= HYPH_INVALID;
  return penalty;
}

Here is the call graph for this function:

array< string > language_rep::get_members ( string  s) [virtual, inherited]

Reimplemented in math_language_rep.

Definition at line 156 of file language.cpp.

                                   {
  (void) s;
  return array<string> ();
}
void language_rep::highlight ( tree  t) [virtual, inherited]

Definition at line 162 of file language.cpp.

                               {
  if (hl_lan != 0 && !has_highlight (t, hl_lan))
    packrat_highlight (res_name, "Main", t);
}

Here is the call graph for this function:

void verb_language_rep::hyphenate ( string  s,
int  after,
string left,
string right 
) [virtual]

Implements language_rep.

Definition at line 56 of file verb_language.cpp.

{ 
  left = s(0, after);
  right= s(after, N(s));
}

Here is the call graph for this function:


Member Data Documentation

int language_rep::hl_lan [inherited]

Definition at line 113 of file language.hpp.

Definition at line 112 of file language.hpp.

string rep< language >::res_name [inherited]

Definition at line 17 of file resource.hpp.


The documentation for this struct was generated from the following files: