Orocos Real-Time Toolkit  2.8.3
Public Types | Public Member Functions | List of all members
RTT::internal::MWSRQueue< T > Class Template Reference

This object represents the default Multi-Writer, Single-Reader queue implementation used by Orocos objects. More...

#include <rtt/internal/MWSRQueue.hpp>

Inheritance diagram for RTT::internal::MWSRQueue< T >:
RTT::internal::AtomicMWSRQueue< T >

Public Types

typedef unsigned int size_type
 

Public Member Functions

 MWSRQueue (int qsize)
 Create a mw/sr queue of fixed size. More...
 
bool isFull () const
 Inspect if the Queue is full. More...
 
bool isEmpty () const
 Inspect if the Queue is empty. More...
 
size_type capacity () const
 Return the maximum number of items this queue can contain. More...
 
size_type size () const
 Return the number of elements in the queue. More...
 
bool enqueue (const T &value)
 Enqueue an item. More...
 
bool dequeue (T &result)
 Dequeue an item. More...
 
const T front () const
 Return the next to be read value. More...
 
void clear ()
 Clear all contents of the Queue and thus make it empty. More...
 

Detailed Description

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

This object represents the default Multi-Writer, Single-Reader queue implementation used by Orocos objects.

Definition at line 66 of file MWSRQueue.hpp.

Member Typedef Documentation

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

Definition at line 161 of file AtomicMWSRQueue.hpp.

Constructor & Destructor Documentation

template<class T>
RTT::internal::MWSRQueue< T >::MWSRQueue ( int  qsize)
inline

Create a mw/sr queue of fixed size.

Definition at line 77 of file MWSRQueue.hpp.

Member Function Documentation

template<class T>
size_type RTT::internal::AtomicMWSRQueue< T >::capacity ( ) const
inlineinherited

Return the maximum number of items this queue can contain.

Definition at line 208 of file AtomicMWSRQueue.hpp.

Referenced by RTT::base::BufferLockFree< T >::capacity().

template<class T>
void RTT::internal::AtomicMWSRQueue< T >::clear ( )
inlineinherited

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

Definition at line 268 of file AtomicMWSRQueue.hpp.

Referenced by RTT::internal::AtomicMWSRQueue< Item * >::AtomicMWSRQueue().

template<class T>
bool RTT::internal::AtomicMWSRQueue< T >::dequeue ( T &  result)
inlineinherited

Dequeue an item.

Parameters
valueStores the dequeued value. It is unchanged when dequeue returns false and contains the dequeued value when it returns true.
Returns
false if queue is empty, true if result was written.

Definition at line 247 of file AtomicMWSRQueue.hpp.

Referenced by RTT::base::BufferLockFree< T >::clear(), RTT::base::BufferLockFree< T >::Pop(), RTT::base::BufferLockFree< T >::PopWithoutRelease(), and RTT::base::BufferLockFree< T >::Push().

template<class T>
bool RTT::internal::AtomicMWSRQueue< T >::enqueue ( const T &  value)
inlineinherited

Enqueue an item.

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

Definition at line 229 of file AtomicMWSRQueue.hpp.

Referenced by RTT::base::BufferLockFree< T >::Push().

template<class T>
const T RTT::internal::AtomicMWSRQueue< T >::front ( ) const
inlineinherited

Return the next to be read value.

Definition at line 260 of file AtomicMWSRQueue.hpp.

template<class T>
bool RTT::internal::AtomicMWSRQueue< T >::isEmpty ( ) const
inlineinherited

Inspect if the Queue is empty.

Returns
true if empty, false otherwise.

Definition at line 197 of file AtomicMWSRQueue.hpp.

Referenced by RTT::base::BufferLockFree< T >::empty().

template<class T>
bool RTT::internal::AtomicMWSRQueue< T >::isFull ( ) const
inlineinherited

Inspect if the Queue is full.

Returns
true if full, false otherwise.

Definition at line 183 of file AtomicMWSRQueue.hpp.

Referenced by RTT::base::BufferLockFree< T >::full().

template<class T>
size_type RTT::internal::AtomicMWSRQueue< T >::size ( ) const
inlineinherited

Return the number of elements in the queue.

Definition at line 216 of file AtomicMWSRQueue.hpp.

Referenced by RTT::base::BufferLockFree< T >::Push(), and RTT::base::BufferLockFree< T >::size().


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