Helios++
Helios software for LiDAR simulations
ITreeIterator.h
1 #pragma once
2 
12 template <typename NodeType>
14 private:
15  // *** SERIALIZATION *** //
16  // *********************** //
17  friend class boost::serialization::access;
24  template <class Archive>
25  void serialize(Archive &ar, unsigned int const version){}
26 
27 public:
28  // *** CONSTRUCTION / DESTRUCTION *** //
29  // ************************************ //
33  ITreeIterator() = default;
34  virtual ~ITreeIterator() {}
35 
36  // *** TREE ITERATOR INTERFACE *** //
37  // ********************************* //
42  virtual void start(NodeType node) = 0;
48  virtual bool hasNext() const = 0;
53  virtual NodeType next() = 0;
54 };
Interface defining core mechanisms that must be provided by any tree iterator.
Definition: ITreeIterator.h:13
ITreeIterator()=default
Default constructor for tree iterator.
virtual void start(NodeType node)=0
Start the iterator at given tree node.
virtual NodeType next()=0
Obtain the next node according to iterator criterion.
virtual bool hasNext() const =0
Check if the iterator has more nodes to visit (true) or not (false)
void serialize(Archive &ar, unsigned int const version)
Serialize a ITreeIterator to a stream of bytes.
Definition: ITreeIterator.h:25