Helios++
Helios software for LiDAR simulations
PointcloudYielder Class Reference

Yield a point cloud from measurements so it is written when buffer size has been reached or, alternatively, when yielder is directly forced to yield. More...

#include <PointcloudYielder.h>

Inheritance diagram for PointcloudYielder:
Collaboration diagram for PointcloudYielder:

Public Member Functions

 PointcloudYielder (FMSWriteFacade &write, size_t bufferSize=256)
 Default constructor for point cloud yielder. More...
 
void digest (vector< Measurement > &copy) override
 Write the temporal copy of the measurements through the write facade of the filems. More...
 
- Public Member Functions inherited from WriteYielder< Measurement >
 WriteYielder (FMSWriteFacade &write, size_t bufferSize=256)
 Default constructor for the abstract write yielder. More...
 
- Public Member Functions inherited from Yielder< T >
 Yielder (std::size_t bufferSize=256)
 Default constructor for the abstract yielder. More...
 
void yield ()
 Make the yielder flush its elements so the output is performed.
 
void push (T const &elem)
 Push the element into the yielder. The element could be simply accumulated or either it could be directly written to file depending on yielder status at push time. More...
 
virtual void digest (vector< T > &copy)=0
 Abstract method that must be overridden by any concrete Yielder implementation to specify how a yield output must be handled/digested.
 
virtual vector< T > copyBuffer () const
 Make a copy of the buffer with its current state. More...
 
void setBufferSize (size_t const bufferSize)
 Set the buffer size of the yielder, effectively. More...
 
size_t getBufferSize () const
 Obtain the current buffer size of the yielder. More...
 

Additional Inherited Members

- Protected Attributes inherited from WriteYielder< Measurement >
FMSWriteFacadewrite
 The facade for writing operations. More...
 
- Protected Attributes inherited from Yielder< T >
std::mutex mtx
 The mutex to handle concurrent push backs to the buffer vector and the yielding operation itself.
 
std::size_t bufferSize
 The number of elements that can be buffered before forcing the yield operation.
 
std::vector< T > buffer
 Where the elements are stored.
 

Detailed Description

Yield a point cloud from measurements so it is written when buffer size has been reached or, alternatively, when yielder is directly forced to yield.

Author
Alberto M. Esmoris Pena
Version
1.0

Constructor & Destructor Documentation

◆ PointcloudYielder()

PointcloudYielder::PointcloudYielder ( FMSWriteFacade write,
size_t  bufferSize = 256 
)
inline

Default constructor for point cloud yielder.

See also
WriteYielder::write
Yielder::bufferSize

Member Function Documentation

◆ digest()

void PointcloudYielder::digest ( vector< Measurement > &  copy)
inlineoverride

Write the temporal copy of the measurements through the write facade of the filems.

Parameters
copyThe temporal copy of measurements buffer to be digested
See also
WriteYielder

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