Orocos Real-Time Toolkit
2.6.0
|
A lock-based queue implementation to enqueue or dequeue a pointer of type T. More...
#include <rtt/internal/LockedQueue.hpp>
Public Types | |
typedef T | value_t |
typedef unsigned int | size_type |
Public Member Functions | |
LockedQueue (unsigned int lsize) | |
Create a lock-based queue wich can store lsize elements. | |
size_type | capacity () const |
size_type | size () const |
bool | isEmpty () const |
Inspect if the Queue is empty. | |
bool | isFull () const |
Inspect if the Queue is full. | |
void | clear () |
bool | enqueue (const T &value) |
Enqueue an item. | |
bool | dequeue (T &result) |
Dequeue an item. | |
value_t | front () const |
Returns the first element of the queue. | |
value_t | back () const |
Returns the last element of the queue. |
A lock-based queue implementation to enqueue or dequeue a pointer of type T.
No memory allocation is done during read or write.
T | The pointer type to be stored in the queue. Example : LockedQueue<A*> is a queue which holds values of type A. |
Definition at line 58 of file LockedQueue.hpp.
RTT::internal::LockedQueue< T >::LockedQueue | ( | unsigned int | lsize | ) | [inline] |
Create a lock-based queue wich can store lsize elements.
lsize | the capacity of the queue. ' |
Definition at line 77 of file LockedQueue.hpp.
bool RTT::internal::LockedQueue< T >::dequeue | ( | T & | result | ) | [inline] |
Dequeue an item.
result | The value dequeued. |
Definition at line 145 of file LockedQueue.hpp.
bool RTT::internal::LockedQueue< T >::enqueue | ( | const T & | value | ) | [inline] |
Enqueue an item.
value | The value to enqueue. |
Definition at line 129 of file LockedQueue.hpp.
bool RTT::internal::LockedQueue< T >::isEmpty | ( | ) | const [inline] |
Inspect if the Queue is empty.
Definition at line 102 of file LockedQueue.hpp.
bool RTT::internal::LockedQueue< T >::isFull | ( | ) | const [inline] |
Inspect if the Queue is full.
Definition at line 112 of file LockedQueue.hpp.