OpenDaVINCI  4.16.0
odtools::recorder::SharedDataListener Class Reference

#include <SharedDataListener.h>

Inheritance diagram for odtools::recorder::SharedDataListener:
Inheritance graph

Public Member Functions

 SharedDataListener (std::shared_ptr< ostream > out, const uint32_t &memorySegmentSize, const uint32_t &numberOfMemorySegments, const bool &threading)
 
virtual ~SharedDataListener ()
 
virtual void add (odcore::data::Container &container)
 
virtual void clear ()
 
virtual uint32_t getSize () const
 
virtual bool isEmpty () const
 
virtual void waitForData ()
 
virtual void wakeAll ()
 

Protected Member Functions

virtual void wait ()
 

Detailed Description

This class encapsulates a listener for SharedData containers.

Constructor & Destructor Documentation

odtools::recorder::SharedDataListener::SharedDataListener ( std::shared_ptr< ostream >  out,
const uint32_t &  memorySegmentSize,
const uint32_t &  numberOfMemorySegments,
const bool &  threading 
)

Constructor.

Parameters
outStream to write data to.
memorySegmentSizeSize of one memory segment.
numberOfMemorySegmentsNumber of available memory segments.
threadingCf. constructor of Recorder.

References CLOG1, and odcore::base::FIFOQueue::enter().

odtools::recorder::SharedDataListener::~SharedDataListener ( )
virtual

Member Function Documentation

void odtools::recorder::SharedDataListener::clear ( )
virtual

This method clears a datastore.

Implements odcore::base::AbstractDataStore.

uint32_t odtools::recorder::SharedDataListener::getSize ( ) const
virtual

This method returns the number of elements currently available in the queue.

Implements odcore::base::AbstractDataStore.

References odcore::base::FIFOQueue::getSize().

Referenced by isEmpty().

bool odtools::recorder::SharedDataListener::isEmpty ( ) const
virtual

This method returns true if getSize() == 0.

Returns
true if getSize() == 0.

Implements odcore::base::AbstractDataStore.

References getSize().

void odcore::base::AbstractDataStore::wait ( )
protectedvirtualinherited

This method can be called to fall asleep.

References odcore::base::Condition::waitOnSignal().

void odcore::base::AbstractDataStore::waitForData ( )
virtualinherited