Helios++
Helios software for LiDAR simulations
ITreeIterator< NodeType > Class Template Referenceabstract

Interface defining core mechanisms that must be provided by any tree iterator. More...

#include <ITreeIterator.h>

Public Member Functions

 ITreeIterator ()=default
 Default constructor for tree iterator.
 
virtual void start (NodeType node)=0
 Start the iterator at given tree node. More...
 
virtual bool hasNext () const =0
 Check if the iterator has more nodes to visit (true) or not (false) More...
 
virtual NodeType next ()=0
 Obtain the next node according to iterator criterion. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned int const version)
 Serialize a ITreeIterator to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename NodeType>
class ITreeIterator< NodeType >

Interface defining core mechanisms that must be provided by any tree iterator.

Author
Alberto M. Esmoris Pena
Version
1.0
Template Parameters
NodeTypeType of tree node

Member Function Documentation

◆ hasNext()

template<typename NodeType >
virtual bool ITreeIterator< NodeType >::hasNext ( ) const
pure virtual

Check if the iterator has more nodes to visit (true) or not (false)

Returns
True if there are nodes left to be visited, false otherwise

Implemented in BinaryTreeFastDepthIterator< NodeType >, BinaryTreeFastBreadthIterator< NodeType >, BinaryTreeDepthIterator< NodeType >, and BinaryTreeBreadthIterator< NodeType >.

◆ next()

template<typename NodeType >
virtual NodeType ITreeIterator< NodeType >::next ( )
pure virtual

Obtain the next node according to iterator criterion.

Returns
Next node according to iterator criterion

Implemented in BinaryTreeFastDepthIterator< NodeType >, BinaryTreeFastBreadthIterator< NodeType >, BinaryTreeDepthIterator< NodeType >, and BinaryTreeBreadthIterator< NodeType >.

◆ serialize()

template<typename NodeType >
template<class Archive >
void ITreeIterator< NodeType >::serialize ( Archive &  ar,
unsigned int const  version 
)
inlineprivate

Serialize a ITreeIterator to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for the ITreeIterator

◆ start()

template<typename NodeType >
virtual void ITreeIterator< NodeType >::start ( NodeType  node)
pure virtual

Start the iterator at given tree node.

Parameters
nodeNode to start iterator

Implemented in BinaryTreeFastDepthIterator< NodeType >, BinaryTreeFastBreadthIterator< NodeType >, BinaryTreeDepthIterator< NodeType >, and BinaryTreeBreadthIterator< NodeType >.


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