Public Types | Public Member Functions | List of all members
RTT::internal::AtomicQueue< T > Class Template Referenceabstract

#include <AtomicQueue.hpp>

Inheritance diagram for RTT::internal::AtomicQueue< T >:
Inheritance graph
[legend]

Public Types

typedef unsigned int size_type
 

Public Member Functions

virtual size_type capacity () const =0
 
virtual void clear ()=0
 
virtual bool dequeue (T &result)=0
 
virtual bool enqueue (const T &value)=0
 
virtual const T front () const =0
 
virtual bool isEmpty () const =0
 
virtual bool isFull () const =0
 
virtual size_type size () const =0
 
virtual ~AtomicQueue ()
 

Detailed Description

template<class T>
class RTT::internal::AtomicQueue< T >

An atomic, non-blocking single ended queue (FIFO) for storing a pointer to T.

Warning
You can not store null pointers.
Parameters
TThe pointer type to be stored in the Queue. Example : AtomicQueue< A* > is a queue of pointers to A.

Definition at line 57 of file AtomicQueue.hpp.

Member Typedef Documentation

template<class T>
typedef unsigned int RTT::internal::AtomicQueue< T >::size_type

Definition at line 60 of file AtomicQueue.hpp.

Constructor & Destructor Documentation

template<class T>
virtual RTT::internal::AtomicQueue< T >::~AtomicQueue ( )
inlinevirtual

Definition at line 62 of file AtomicQueue.hpp.

Member Function Documentation

template<class T>
virtual size_type RTT::internal::AtomicQueue< T >::capacity ( ) const
pure virtual

Return the maximum number of items this queue can contain.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual void RTT::internal::AtomicQueue< T >::clear ( )
pure virtual

Clear all contents of the Queue and thus make it empty.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual bool RTT::internal::AtomicQueue< T >::dequeue ( T &  result)
pure virtual

Dequeue an item.

Parameters
valueThe value dequeued.
Returns
false if queue is empty, true if dequeued.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual bool RTT::internal::AtomicQueue< T >::enqueue ( const T &  value)
pure virtual

Enqueue an item.

Parameters
valueThe value to enqueue, not zero.
Returns
false if queue is full or value is zero, true if queued.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual const T RTT::internal::AtomicQueue< T >::front ( ) const
pure virtual

Return the next to be read value.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual bool RTT::internal::AtomicQueue< T >::isEmpty ( ) const
pure virtual

Inspect if the Queue is empty.

Returns
true if empty, false otherwise.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual bool RTT::internal::AtomicQueue< T >::isFull ( ) const
pure virtual

Inspect if the Queue is full.

Returns
true if full, false otherwise.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.

template<class T>
virtual size_type RTT::internal::AtomicQueue< T >::size ( ) const
pure virtual

Return the exact number of elements in the queue. This is slow because it scans the whole queue.

Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.


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


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:43