evio  6.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::nodeIterator< R > Class Template Reference

Depth first iterator. More...

#include <BaseStructure.h>

Public Member Functions

 nodeIterator (R &node, bool isEnd)
 Constructor that copies shared pointer arg. More...
 
operator* () const
 Dereference operator. More...
 
bool operator== (const nodeIterator &other) const
 Equal operator. More...
 
bool operator!= (const nodeIterator &other) const
 Not equal operator. More...
 
bool isEndIter ()
 Is this the end of the iterator? More...
 
const nodeIterator operator++ (int)
 Post increment operator gets ignored arg of 0 to distinguish from pre, A++. More...
 
const nodeIteratoroperator++ ()
 Pre increment operator, ++A. More...
 

Protected Attributes

std::stack< std::pair< KidIter, KidIter > > stack
 Stack of pair containing 2 iterators, each iterating over vector of node's children (shared pts). More...
 
currentNode
 Where we are now in the tree. More...
 
bool isEnd
 Is this the end iterator? More...
 

Detailed Description

template<typename R>
class evio::nodeIterator< R >

Depth first iterator.

Constructor & Destructor Documentation

◆ nodeIterator()

template<typename R >
evio::nodeIterator< R >::nodeIterator ( R &  node,
bool  isEnd 
)
inlineexplicit

Constructor that copies shared pointer arg.

References evio::nodeIterator< R >::isEnd, and evio::nodeIterator< R >::stack.

Member Function Documentation

◆ isEndIter()

template<typename R >
bool evio::nodeIterator< R >::isEndIter ( )
inline

Is this the end of the iterator?

Returns
true if end of iterator.

References evio::nodeIterator< R >::isEnd.

◆ operator!=()

template<typename R >
bool evio::nodeIterator< R >::operator!= ( const nodeIterator< R > &  other) const
inline

Not equal operator.

References evio::nodeIterator< R >::isEnd.

◆ operator*()

template<typename R >
R evio::nodeIterator< R >::operator* ( ) const
inline

Dereference operator.

References evio::nodeIterator< R >::currentNode.

◆ operator++() [1/2]

template<typename R >
const nodeIterator& evio::nodeIterator< R >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename R >
const nodeIterator evio::nodeIterator< R >::operator++ ( int  )
inline

Post increment operator gets ignored arg of 0 to distinguish from pre, A++.

References evio::nodeIterator< R >::currentNode, evio::nodeIterator< R >::isEnd, and evio::nodeIterator< R >::stack.

◆ operator==()

template<typename R >
bool evio::nodeIterator< R >::operator== ( const nodeIterator< R > &  other) const
inline

Equal operator.

References evio::nodeIterator< R >::isEnd.

Member Data Documentation

◆ currentNode

template<typename R >
R evio::nodeIterator< R >::currentNode
protected

Where we are now in the tree.

Referenced by evio::nodeIterator< R >::operator*(), and evio::nodeIterator< R >::operator++().

◆ isEnd

◆ stack

template<typename R >
std::stack<std::pair<KidIter, KidIter> > evio::nodeIterator< R >::stack
protected

Stack of pair containing 2 iterators, each iterating over vector of node's children (shared pts).

In each pair, first is current iterator, second is end iterator.

Referenced by evio::nodeIterator< R >::nodeIterator(), and evio::nodeIterator< R >::operator++().


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