clockUtils  1.1
clockUtils::container::DoubleBufferQueue< T, producer, consumer > Class Template Reference

#include <DoubleBufferQueue.h>

Public Member Functions

 DoubleBufferQueue ()
 default constructor More...
 
void push (const T &value)
 pushes the given value into the queue More...
 
ClockError pop ()
 removes first entry of the queue More...
 
ClockError front (T &value)
 returns first entry of the queue, but keeps it in the queue More...
 
ClockError poll (T &value)
 removes first entry of the queue and returns its value More...
 
bool empty () const
 returns true if the queue is empty, otherwise false More...
 
size_t size () const
 returns size of the queue More...
 
void clear ()
 removes all elements in the queue More...
 

Detailed Description

template<typename T, bool producer = true, bool consumer = true>
class clockUtils::container::DoubleBufferQueue< T, producer, consumer >

class DoubleBufferQueue

T defines the data type being contained in the queue producer tells whether more than one thread pushes data into the queue consumer tells whether more than one thread pulls data from the queue

Definition at line 46 of file DoubleBufferQueue.h.

Constructor & Destructor Documentation

§ DoubleBufferQueue()

template<typename T , bool producer = true, bool consumer = true>
clockUtils::container::DoubleBufferQueue< T, producer, consumer >::DoubleBufferQueue ( )
inline

default constructor

Definition at line 59 of file DoubleBufferQueue.h.

Here is the caller graph for this function:

Member Function Documentation

§ clear()

template<typename T , bool producer = true, bool consumer = true>
void clockUtils::container::DoubleBufferQueue< T, producer, consumer >::clear ( )
inline

removes all elements in the queue

Definition at line 108 of file DoubleBufferQueue.h.

Here is the call graph for this function:

§ empty()

template<typename T , bool producer = true, bool consumer = true>
bool clockUtils::container::DoubleBufferQueue< T, producer, consumer >::empty ( ) const
inline

returns true if the queue is empty, otherwise false

Definition at line 94 of file DoubleBufferQueue.h.

§ front()

template<typename T , bool producer = true, bool consumer = true>
ClockError clockUtils::container::DoubleBufferQueue< T, producer, consumer >::front ( T &  value)
inline

returns first entry of the queue, but keeps it in the queue

Definition at line 80 of file DoubleBufferQueue.h.

Here is the caller graph for this function:

§ poll()

template<typename T , bool producer = true, bool consumer = true>
ClockError clockUtils::container::DoubleBufferQueue< T, producer, consumer >::poll ( T &  value)
inline

removes first entry of the queue and returns its value

Definition at line 87 of file DoubleBufferQueue.h.

Here is the caller graph for this function:

§ pop()

template<typename T , bool producer = true, bool consumer = true>
ClockError clockUtils::container::DoubleBufferQueue< T, producer, consumer >::pop ( )
inline

removes first entry of the queue

Definition at line 73 of file DoubleBufferQueue.h.

Here is the caller graph for this function:

§ push()

template<typename T , bool producer = true, bool consumer = true>
void clockUtils::container::DoubleBufferQueue< T, producer, consumer >::push ( const T &  value)
inline

pushes the given value into the queue

Definition at line 65 of file DoubleBufferQueue.h.

§ size()

template<typename T , bool producer = true, bool consumer = true>
size_t clockUtils::container::DoubleBufferQueue< T, producer, consumer >::size ( ) const
inline

returns size of the queue

Definition at line 101 of file DoubleBufferQueue.h.


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