Orocos Real-Time Toolkit
2.9.0
|
This object represents the default Multi-Writer/Multi-Reader queue implementation used by Orocos objects. More...
#include <rtt/internal/Queue.hpp>
Public Types | |
typedef unsigned int | size_type |
Public Member Functions | |
Queue (int qsize) | |
Create a mw/sr queue of fixed size. More... | |
virtual bool | isFull () const =0 |
Inspect if the Queue is full. More... | |
virtual bool | isEmpty () const =0 |
Inspect if the Queue is empty. More... | |
virtual size_type | capacity () const =0 |
Return the maximum number of items this queue can contain. More... | |
virtual size_type | size () const =0 |
Return the exact number of elements in the queue. More... | |
virtual bool | enqueue (const T &value)=0 |
Enqueue an item. More... | |
virtual bool | dequeue (T &result)=0 |
Dequeue an item. More... | |
virtual const T | front () const =0 |
Return the next to be read value. More... | |
virtual void | clear ()=0 |
Clear all contents of the Queue and thus make it empty. More... | |
This object represents the default Multi-Writer/Multi-Reader queue implementation used by Orocos objects.
|
inherited |
Definition at line 60 of file AtomicQueue.hpp.
|
inline |
|
pure virtualinherited |
Return the maximum number of items this queue can contain.
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::base::BufferLockFree< T >::capacity(), and RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
Clear all contents of the Queue and thus make it empty.
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
Dequeue an item.
value | The value dequeued. |
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::base::BufferLockFree< T >::clear(), RTT::base::BufferLockFree< T >::Pop(), RTT::base::BufferLockFree< T >::PopWithoutRelease(), RTT::base::BufferLockFree< T >::Push(), and RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
Enqueue an item.
value | The value to enqueue, not zero. |
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::base::BufferLockFree< T >::Push(), and RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
Return the next to be read value.
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
Inspect if the Queue is empty.
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::base::BufferLockFree< T >::empty(), and RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
Inspect if the Queue is full.
Implemented in RTT::internal::AtomicMWMRQueue< T >, and RTT::internal::AtomicMWSRQueue< T >.
Referenced by RTT::base::BufferLockFree< T >::full(), and RTT::internal::AtomicQueue< Item * >::~AtomicQueue().
|
pure virtualinherited |
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 >.
Referenced by RTT::base::BufferLockFree< T >::Push(), RTT::base::BufferLockFree< T >::size(), and RTT::internal::AtomicQueue< Item * >::~AtomicQueue().