Helios++
Helios software for LiDAR simulations
GroveTreeWrapper< Tree > Class Template Reference

Wrapper for trees belonging to a StaticGrove so for-each loop can be used. More...

#include <GroveTreeWrapper.h>

Collaboration diagram for GroveTreeWrapper< Tree >:

Public Member Functions

 GroveTreeWrapper (StaticGrove< Tree > &grove, size_t const index)
 Build a wrapper for the tree at given index. More...
 
GroveTreeWrapper operator++ ()
 Incremental operator to handle forward iterations in for-each loops.
 
bool operator!= (GroveTreeWrapper const &b) const
 Comparison operator to handle last iteration detection in for-each loops.
 
const std::shared_ptr< Tree > operator* () const
 Operator to obtain the tree corresponding to current for-each loop iteration.
 

Protected Attributes

StaticGrove< Tree > & grove
 The grove where the tree belongs to.
 
size_t index
 Index of the tree inside the grove.
 

Detailed Description

template<typename Tree>
class GroveTreeWrapper< Tree >

Wrapper for trees belonging to a StaticGrove so for-each loop can be used.

Author
Alberto M. Esmoris Pena
Version
1.0
Template Parameters
TreeThe type of tree to be wrapped

Constructor & Destructor Documentation

◆ GroveTreeWrapper()

template<typename Tree >
GroveTreeWrapper< Tree >::GroveTreeWrapper ( StaticGrove< Tree > &  grove,
size_t const  index 
)

Build a wrapper for the tree at given index.

Parameters
groveGrove containing the tree
indexIndex of the tree inside the grove context

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