nodes::tree::iterator Class Reference

#include <tree.h>

Inheritance diagram for nodes::tree::iterator:

Inheritance graph
[legend]
Collaboration diagram for nodes::tree::iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 iterator (const tree *initial, traversal_directions direction)
 ~iterator ()
treenext ()
 Returns a pointer to the next tree in the direction of traversal.
void whack (tree *to_whack)
 destroys the tree "to_whack".

Public Attributes

traversal_directions _order
elevator_directions _aim

Detailed Description

Definition at line 119 of file tree.h.


Constructor & Destructor Documentation

nodes::tree::iterator::iterator ( const tree initial,
traversal_directions  direction 
)

Definition at line 42 of file tree.cpp.

nodes::tree::iterator::~iterator (  ) 

Definition at line 47 of file tree.cpp.

References nodes::path::pop(), and nodes::path::size().


Member Function Documentation

tree * nodes::tree::iterator::next (  ) 

Returns a pointer to the next tree in the direction of traversal.

If the traversal is finished, NIL is returned.

Definition at line 250 of file tree.cpp.

References FUNCDEF, and NIL.

Referenced by nodes::symbol_tree::text_form().

void nodes::tree::iterator::whack ( tree to_whack  ) 

destroys the tree "to_whack".

whacks the node "to_whack" by patching this iterator so that future iterations will be correct. it is required that the "to_whack" node was just returned from a call to next(). NOTE: this has only been tested with postfix so far.

Definition at line 216 of file tree.cpp.

References nodes::path::current(), FUNCDEF, LOG, nodes::tree::parent(), nodes::path::pop(), nodes::tree::prune(), nodes::path::size(), and WHACK().


Member Data Documentation

traversal_directions nodes::tree::iterator::_order

Definition at line 136 of file tree.h.

elevator_directions nodes::tree::iterator::_aim

Definition at line 137 of file tree.h.


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:31:07 2008 for HOOPLE Libraries by  doxygen 1.5.1