OpenDaVINCI  4.15.3
odcore::base::AbstractDataStore Class Referenceabstract

#include <AbstractDataStore.h>

Inheritance diagram for odcore::base::AbstractDataStore:
Inheritance graph

Public Member Functions

 AbstractDataStore ()
 
virtual ~AbstractDataStore ()
 
virtual void waitForData ()
 
virtual void wakeAll ()
 
virtual void add (odcore::data::Container &container)=0
 
virtual void clear ()=0
 
virtual uint32_t getSize () const =0
 
virtual bool isEmpty () const =0
 

Protected Member Functions

virtual void wait ()
 

Detailed Description

This interface encapsulates methods for every data store.

Constructor & Destructor Documentation

odcore::base::AbstractDataStore::AbstractDataStore ( )
odcore::base::AbstractDataStore::~AbstractDataStore ( )
virtual

Member Function Documentation

virtual void odcore::base::AbstractDataStore::add ( odcore::data::Container container)
pure virtual

This method adds a new container to this data store depending on the entering strategy (i.e. front or end).

Parameters
containerContainer to be added.

Implemented in odtools::recorder::SharedDataListener, odcore::base::FIFOQueue, and odcore::base::LIFOQueue.

Referenced by odcore::base::module::TimeTriggeredConferenceClientModule::nextContainer().

virtual void odcore::base::AbstractDataStore::clear ( )
pure virtual

This method clears a datastore.

Implemented in odtools::recorder::SharedDataListener, odcore::base::FIFOQueue, and odcore::base::LIFOQueue.

virtual uint32_t odcore::base::AbstractDataStore::getSize ( ) const
pure virtual

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

Implemented in odtools::recorder::SharedDataListener, odcore::base::FIFOQueue, and odcore::base::LIFOQueue.

virtual bool odcore::base::AbstractDataStore::isEmpty ( ) const
pure virtual

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

Returns
true if getSize() == 0.

Implemented in odtools::recorder::SharedDataListener, odcore::base::FIFOQueue, and odcore::base::LIFOQueue.

Referenced by waitForData().

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

This method can be called to fall asleep.

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

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

This method can be called to fall asleep.

References isEmpty(), and odcore::base::Condition::waitOnSignal().

Referenced by odcore::base::FIFOQueue::leave(), and odcore::base::LIFOQueue::pop().