#include <tree.h>
Inheritance diagram for nodes::tree::iterator:


Public Member Functions | |
| iterator (const tree *initial, traversal_directions direction) | |
| ~iterator () | |
| tree * | next () |
| 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 |
Definition at line 119 of file tree.h.
| nodes::tree::iterator::iterator | ( | const tree * | initial, | |
| traversal_directions | direction | |||
| ) |
| nodes::tree::iterator::~iterator | ( | ) |
| 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.
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().
1.5.1