lab_trees
Tempestuous Trees
|
A forward iterator class through an TreeTravesal, derived from the std iterator class. More...
#include <TreeTraversal.h>
Public Member Functions | |
Iterator () | |
Default constructor for Iterator class Sets the traversal pointer to NULL. More... | |
Iterator (TreeTraversal< T > *traversal, typename BinaryTree< T >::Node *root) | |
Two parameters constructor for Iterator class. More... | |
Iterator & | operator++ () |
operator++ for Iterator class More... | |
BinaryTree< T >::Node * | operator * () |
Iterator access opreator. More... | |
bool | operator!= (const Iterator &other) |
Iterator inequality operator. More... | |
Private Attributes | |
TreeTraversal * | traversal |
BinaryTree< T >::Node * | root |
BinaryTree< T >::Node * | current |
A forward iterator class through an TreeTravesal, derived from the std iterator class.
|
inline |
Default constructor for Iterator class Sets the traversal pointer to NULL.
|
inline |
Two parameters constructor for Iterator class.
traversal | The traversal reference passed in |
root | The root of the tree to be traversed |
initialize the current iterator to top Node of the stack
|
inline |
Iterator access opreator.
|
inline |
Iterator inequality operator.
|
inline |
operator++ for Iterator class