StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
StiKTNIterator Class Reference

#include <StiKTNIterator.h>

Inheritance diagram for StiKTNIterator:
StiKTNForwardIterator

Public Member Functions

 StiKTNIterator (KTN_t *leaf=0, int dir=0)
 ctr-dstr
 
 StiKTNIterator (KTN_t &leaf, int dir=0)
 
StiKTNIterator begin ()
 
StiKTNIterator rbegin ()
 
bool operator== (const StiKTNIterator &rhs) const
 equality:
 
bool operator!= (const StiKTNIterator &rhs) const
 inequlity
 
KTN_toperator* ()
 
KTN_toperator() ()
 
StiKTNIteratoroperator++ ()
 prefix More...
 
StiKTNIterator operator++ (int)
 postfix More...
 
StiKTNIteratoroperator-- ()
 prefix More...
 
StiKTNIterator operator-- (int)
 postfix More...
 

Static Public Member Functions

static const StiKTNIteratorend ()
 We demarcate the end of the traversal via a singular iterator.
 
static const StiKTNIteratorrend ()
 
static StiKTNIterator begin (KTN_t *fist)
 
static StiKTNIterator rbegin (KTN_t *last)
 

Detailed Description

This class is an STL compliant forward iterator that will traverse from the leaf of a tree upward to a root.

Author
M.L. Miller (Yale Software)
Note
We use the defualt copy/assignment generated by compiler.
Singularity (i.e., 'end') is represented by setting mNode=0.
StiKTNIterator is a non-virtual class.

Definition at line 25 of file StiKTNIterator.h.

Member Function Documentation

StiKTNIterator & StiKTNIterator::operator++ ( void  )
inline

prefix

In the case where the prefix operator increments beyond the last leaf of the tree, the pointer to mNode is set to -. This demarcates the end of traversal.

Definition at line 126 of file StiKTNIterator.h.

References StiTreeNode::getNextNode().

StiKTNIterator StiKTNIterator::operator++ ( int  )
inline

postfix

In the case where the prefix operator increments beyond the root of the tree, the pointer to mNode is set to 0. This demarcates the end of the traversal.

Definition at line 115 of file StiKTNIterator.h.

StiKTNIterator & StiKTNIterator::operator-- ( void  )
inline

prefix

In the case where the prefix operator increments beyond the root of the tree, the pointer to mNode is set to 0. This demarcates the end of the traversal.

Definition at line 102 of file StiKTNIterator.h.

StiKTNIterator StiKTNIterator::operator-- ( int  )
inline

postfix

In the case where the prefix operator increments beyond the root of the tree, the pointer to mNode is set to 0. This demarcates the end of the traversal.

Definition at line 145 of file StiKTNIterator.h.


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