Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes | Private Attributes
tree_pointer_rep Class Reference
Inheritance diagram for tree_pointer_rep:
Inheritance graph
[legend]
Collaboration diagram for tree_pointer_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tree_pointer_rep (tree ref, bool flag2)
int get_type ()
tm_ostreamprint (tm_ostream &out)
void announce (tree &ref, modification mod)
void notify_assign (tree &ref, tree t)
void notify_insert (tree &ref, int pos, int nr)
void notify_remove (tree &ref, int pos, int nr)
void notify_split (tree &ref, int pos, tree prev)
void notify_var_split (tree &ref, tree t1, tree t2)
void notify_join (tree &ref, int pos, tree next)
void notify_var_join (tree &ref, tree t, int offset)
void notify_assign_node (tree &ref, tree_label op)
void notify_insert_node (tree &ref, int pos)
void notify_remove_node (tree &ref, int pos)
void notify_detach (tree &ref, tree closest, bool right)
list< observerget_tree_pointers ()
bool set_tree (tree t)
bool get_tree (tree &t)
virtual void announce_assign (tree &ref, path p, tree t)
virtual void announce_insert (tree &ref, path p, tree ins)
virtual void announce_remove (tree &ref, path p, int nr)
virtual void announce_split (tree &ref, path p)
virtual void announce_join (tree &ref, path p)
virtual void announce_assign_node (tree &ref, path p, tree_label op)
virtual void announce_insert_node (tree &ref, path p, tree ins)
virtual void announce_remove_node (tree &ref, path p)
virtual void announce_set_cursor (tree &ref, path p, tree data)
virtual void done (tree &ref, modification mod)
virtual void touched (tree &ref, path p)
virtual void notify_set_cursor (tree &ref, int pos, tree data)
virtual bool get_ip (path &ip)
virtual bool set_ip (path ip)
virtual bool get_position (tree &t, int &index)
virtual bool set_position (tree t, int index)
virtual observerget_child (int which)
virtual bool get_contents (int kind, blackbox &bb)
virtual bool set_highlight (int lan, int col, int start, int end)
virtual bool get_highlight (int lan, array< int > &cols)

Public Attributes

int ref_count

Private Attributes

tree_repptr
bool flag

Detailed Description

Definition at line 23 of file tree_pointer.cpp.


Constructor & Destructor Documentation

tree_pointer_rep::tree_pointer_rep ( tree  ref,
bool  flag2 
) [inline]

Definition at line 29 of file tree_pointer.cpp.

: ptr (ref.rep), flag (flag2) {}

Member Function Documentation

void tree_pointer_rep::announce ( tree ref,
modification  mod 
) [inline, virtual]

Reimplemented from observer_rep.

Definition at line 32 of file tree_pointer.cpp.

                                              {
    (void) ref; link_announce (observer (this), mod); }

Here is the call graph for this function:

void observer_rep::announce_assign ( tree ref,
path  p,
tree  t 
) [virtual, inherited]

Definition at line 587 of file observer.cpp.

                                                        {
  (void) ref; (void) p; (void) t;
}

Here is the caller graph for this function:

void observer_rep::announce_assign_node ( tree ref,
path  p,
tree_label  op 
) [virtual, inherited]

Definition at line 612 of file observer.cpp.

                                                                    {
  (void) ref; (void) p; (void) op;
}

Here is the caller graph for this function:

void observer_rep::announce_insert ( tree ref,
path  p,
tree  ins 
) [virtual, inherited]

Definition at line 592 of file observer.cpp.

                                                          {
  (void) ref; (void) p; (void) ins;
}

Here is the caller graph for this function:

void observer_rep::announce_insert_node ( tree ref,
path  p,
tree  ins 
) [virtual, inherited]

Definition at line 617 of file observer.cpp.

                                                               {
  (void) ref; (void) p; (void) ins;
}

Here is the caller graph for this function:

void observer_rep::announce_join ( tree ref,
path  p 
) [virtual, inherited]

Definition at line 607 of file observer.cpp.

                                              {
  (void) ref; (void) p;
}

Here is the caller graph for this function:

void observer_rep::announce_remove ( tree ref,
path  p,
int  nr 
) [virtual, inherited]

Definition at line 597 of file observer.cpp.

                                                        {
  (void) ref; (void) p; (void) nr;
}

Here is the caller graph for this function:

void observer_rep::announce_remove_node ( tree ref,
path  p 
) [virtual, inherited]

Definition at line 622 of file observer.cpp.

                                                     {
  (void) ref; (void) p;
}

Here is the caller graph for this function:

void observer_rep::announce_set_cursor ( tree ref,
path  p,
tree  data 
) [virtual, inherited]

Definition at line 627 of file observer.cpp.

                                                               {
  (void) ref; (void) p; (void) data;
}

Here is the caller graph for this function:

void observer_rep::announce_split ( tree ref,
path  p 
) [virtual, inherited]

Definition at line 602 of file observer.cpp.

                                               {
  (void) ref; (void) p;
}

Here is the caller graph for this function:

void observer_rep::done ( tree ref,
modification  mod 
) [virtual, inherited]

Reimplemented in list_observer_rep, ip_observer_rep, and edit_observer_rep.

Definition at line 577 of file observer.cpp.

                                               {
  (void) ref; (void) mod;
}
observer & observer_rep::get_child ( int  which) [virtual, inherited]

Reimplemented in list_observer_rep.

Definition at line 716 of file observer.cpp.

                                  {
  (void) which;
  return nil_observer;
}
bool observer_rep::get_contents ( int  kind,
blackbox bb 
) [virtual, inherited]

Reimplemented in list_observer_rep, and tree_addendum_rep.

Definition at line 733 of file observer.cpp.

                                                  {
  (void) kind; (void) bb;
  return false;
}
bool observer_rep::get_highlight ( int  lan,
array< int > &  cols 
) [virtual, inherited]

Reimplemented in list_observer_rep, and highlight_observer_rep.

Definition at line 745 of file observer.cpp.

                                                      {
  (void) lan; (void) cols; return false;
}
bool observer_rep::get_ip ( path ip) [virtual, inherited]

Reimplemented in list_observer_rep, and ip_observer_rep.

Definition at line 692 of file observer.cpp.

                              {
  (void) ip;
  return false;
}
bool observer_rep::get_position ( tree t,
int &  index 
) [virtual, inherited]

Reimplemented in list_observer_rep, and tree_position_rep.

Definition at line 704 of file observer.cpp.

                                               {
  (void) t; (void) index;
  return false;
}
bool tree_pointer_rep::get_tree ( tree t) [virtual]

Reimplemented from observer_rep.

Definition at line 62 of file tree_pointer.cpp.

                                   {
  t= tree (ptr);
  return true;
}

Reimplemented from observer_rep.

Definition at line 57 of file tree_pointer.cpp.

                                     {
  return list<observer> (observer (this));
}
int tree_pointer_rep::get_type ( ) [inline, virtual]

Reimplemented from observer_rep.

Definition at line 30 of file tree_pointer.cpp.

{ return OBSERVER_POINTER; }
void tree_pointer_rep::notify_assign ( tree ref,
tree  t 
) [virtual]

Reimplemented from observer_rep.

Definition at line 83 of file tree_pointer.cpp.

                                                  {
  // cout << "Notify assign " << ref << ", " << t << "\n";
  (void) ref; (void) set_tree (t);
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}

Here is the call graph for this function:

void tree_pointer_rep::notify_assign_node ( tree ref,
tree_label  op 
) [virtual]

Reimplemented from observer_rep.

Definition at line 130 of file tree_pointer.cpp.

                                                              {
  // cout << "Notify assign node " << ref << ", " << as_string (op) << "\n";
  (void) ref; (void) op;
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}
void tree_pointer_rep::notify_detach ( tree ref,
tree  closest,
bool  right 
) [virtual]

Reimplemented from observer_rep.

Definition at line 156 of file tree_pointer.cpp.

                                                                    {
  // cout << "Notify detach " << ref << ", " << closest <<", "<< right << "\n";
  (void) right; (void) ref;
  (void) set_tree (closest);
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}

Here is the call graph for this function:

void tree_pointer_rep::notify_insert ( tree ref,
int  pos,
int  nr 
) [virtual]

Reimplemented from observer_rep.

Definition at line 90 of file tree_pointer.cpp.

                                                           {
  // cout << "Notify insert " << ref << ", " << pos << ", " << nr << "\n";
  (void) ref; (void) pos; (void) nr;
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}
void tree_pointer_rep::notify_insert_node ( tree ref,
int  pos 
) [virtual]

Reimplemented from observer_rep.

Definition at line 137 of file tree_pointer.cpp.

                                                        {
  //cout << "Notify insert node " << ref << ", " << pos << "\n";
  (void) ref; (void) pos;
  if (flag) {
    remove_observer (ref[pos]->obs, observer (this));
    ptr= ref.rep;
    insert_observer (ref->obs, observer (this));    
  }
  //cout << "position -> " << obtain_position (observer (this)) << "\n";
}

Here is the call graph for this function:

void tree_pointer_rep::notify_join ( tree ref,
int  pos,
tree  next 
) [virtual]

Reimplemented from observer_rep.

Definition at line 117 of file tree_pointer.cpp.

                                                            {
  (void) ref; (void) pos; (void) next;
}
void tree_pointer_rep::notify_remove ( tree ref,
int  pos,
int  nr 
) [virtual]

Reimplemented from observer_rep.

Definition at line 97 of file tree_pointer.cpp.

                                                           {
  // cout << "Notify remove " << ref << ", " << pos << ", " << nr << "\n";
  (void) ref; (void) pos; (void) nr;
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}
void tree_pointer_rep::notify_remove_node ( tree ref,
int  pos 
) [virtual]

Reimplemented from observer_rep.

Definition at line 149 of file tree_pointer.cpp.

                                                        {
  // cout << "Notify remove node " << ref << ", " << pos << "\n";
  (void) set_tree (ref[pos]);
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}

Here is the call graph for this function:

void observer_rep::notify_set_cursor ( tree ref,
int  pos,
tree  data 
) [virtual, inherited]

Reimplemented in list_observer_rep.

Definition at line 682 of file observer.cpp.

                                                              {
  (void) ref; (void) pos; (void) data;
}
void tree_pointer_rep::notify_split ( tree ref,
int  pos,
tree  prev 
) [virtual]

Reimplemented from observer_rep.

Definition at line 104 of file tree_pointer.cpp.

                                                             {
  (void) ref; (void) pos; (void) prev;
}
void tree_pointer_rep::notify_var_join ( tree ref,
tree  t,
int  offset 
) [virtual]

Reimplemented from observer_rep.

Definition at line 122 of file tree_pointer.cpp.

                                                                {
  // cout << "Notify var join " << ref << ", " << t << ", " << offset << "\n";
  (void) ref; (void) offset;
  (void) set_tree (t);
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}

Here is the call graph for this function:

void tree_pointer_rep::notify_var_split ( tree ref,
tree  t1,
tree  t2 
) [virtual]

Reimplemented from observer_rep.

Definition at line 109 of file tree_pointer.cpp.

                                                               {
  // cout << "Notify var split " << ref << ", " << t1 << ", " << t2 << "\n";
  (void) t2; (void) ref;
  (void) set_tree (t1); // always at the left
  // cout << "position -> " << obtain_position (observer (this)) << "\n";
}

Here is the call graph for this function:

tm_ostream& tree_pointer_rep::print ( tm_ostream out) [inline, virtual]

Reimplemented from observer_rep.

Definition at line 31 of file tree_pointer.cpp.

{ return out << " pointer"; }
bool observer_rep::set_highlight ( int  lan,
int  col,
int  start,
int  end 
) [virtual, inherited]

Reimplemented in list_observer_rep, and highlight_observer_rep.

Definition at line 739 of file observer.cpp.

                                                                 {
  (void) col; (void) start; (void) end; (void) lan;
  return false;
}
bool observer_rep::set_ip ( path  ip) [virtual, inherited]

Reimplemented in list_observer_rep, and ip_observer_rep.

Definition at line 698 of file observer.cpp.

                             {
  (void) ip;
  return false;
}
bool observer_rep::set_position ( tree  t,
int  index 
) [virtual, inherited]

Reimplemented in list_observer_rep, and tree_position_rep.

Definition at line 710 of file observer.cpp.

                                             {
  (void) t; (void) index;
  return false;
}

Definition at line 68 of file tree_pointer.cpp.

                                  {
  if (ptr != t.rep) {
    tree ref (ptr);
    remove_observer (ref->obs, observer (this));
    ptr= t.rep;
    insert_observer (t->obs, observer (this));
  }
  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void observer_rep::touched ( tree ref,
path  p 
) [virtual, inherited]

Reimplemented in list_observer_rep, ip_observer_rep, and edit_observer_rep.

Definition at line 582 of file observer.cpp.

                                        {
  (void) ref; (void) p;
}

Member Data Documentation

bool tree_pointer_rep::flag [private]

Definition at line 26 of file tree_pointer.cpp.

Definition at line 25 of file tree_pointer.cpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.


The documentation for this class was generated from the following file: