lab_trees
Tempestuous Trees
|
Pure virtual class for traversal algorithms on trees. More...
#include <TreeTraversal.h>
Classes | |
class | Iterator |
A forward iterator class through an TreeTravesal, derived from the std iterator class. More... | |
Public Member Functions | |
virtual Iterator | begin ()=0 |
Public pure virtual begin() function. More... | |
virtual Iterator | end ()=0 |
Public pure virtual end() function. More... | |
virtual void | add (typename BinaryTree< T >::Node *&treeNode)=0 |
Public pure virtual add() function. More... | |
virtual BinaryTree< T >::Node * | pop ()=0 |
Public pure virtual pop() function remove the current Node to be processed. More... | |
virtual BinaryTree< T >::Node * | peek () const =0 |
Public pure virtual peek() function. More... | |
virtual bool | empty () const =0 |
Public pure virtual empty() function. More... | |
Pure virtual class for traversal algorithms on trees.
Each derived class must not modify the tree itself
A derived class provides a traversal by returning instances of TreeTraversal::Iterator.
|
pure virtual |
Public pure virtual add() function.
treeNode | The current Node to be processed |
Implemented in InorderTraversal< T >, and PreorderTraversal< T >.
|
pure virtual |
Public pure virtual begin() function.
Implemented in InorderTraversal< T >, and PreorderTraversal< T >.
|
pure virtual |
Public pure virtual empty() function.
Implemented in InorderTraversal< T >, and PreorderTraversal< T >.
|
pure virtual |
Public pure virtual end() function.
Implemented in InorderTraversal< T >, and PreorderTraversal< T >.
|
pure virtual |
Public pure virtual peek() function.
Implemented in InorderTraversal< T >, and PreorderTraversal< T >.
|
pure virtual |
Public pure virtual pop() function remove the current Node to be processed.
Implemented in InorderTraversal< T >, and PreorderTraversal< T >.