OpenDaVINCI  4.16.0
odcore::base::FIFOQueue Class Reference

#include <FIFOQueue.h>

Inheritance diagram for odcore::base::FIFOQueue:
Inheritance graph

Public Member Functions

 FIFOQueue ()
 
virtual ~FIFOQueue ()
 
virtual void clear ()
 
virtual void enter (const data::Container &container)
 
const data::Container leave ()
 
virtual void add (odcore::data::Container &container)
 
virtual uint32_t getSize () const
 
virtual bool isEmpty () const
 
virtual void waitForData ()
 
virtual void wakeAll ()
 

Protected Member Functions

const data::Container get (const uint32_t &index) const
 
virtual void wait ()
 

Detailed Description

This interface encapsulates all methods necessary for a FIFO.

Constructor & Destructor Documentation

odcore::base::FIFOQueue::FIFOQueue ( )
odcore::base::FIFOQueue::~FIFOQueue ( )
virtual

Member Function Documentation

void odcore::base::FIFOQueue::add ( odcore::data::Container container)
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.

Implements odcore::base::AbstractDataStore.

References enter().

Referenced by odcontext::base::SystemContextComponent::nextContainer().

const Container odcore::base::FIFOQueue::get ( const uint32_t &  index) const
protected

This method returns the element at the given index or an empty container.

Parameters
indexIndex of the element to be retrieved.
Returns
Element at the given index.

References getSize(), and isEmpty().

bool odcore::base::FIFOQueue::isEmpty ( ) const
virtual
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

This method can be called to fall asleep.

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

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

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