Pothos
0.4.1-gb758ed46
The Pothos dataflow programming software suite
|
#include <OrderedQueue.hpp>
Public Member Functions | |
OrderedQueue (void) | |
Construct a size-zero ordered queue. More... | |
OrderedQueue (const size_t capacity) | |
Construct a new ordered queue – with space reservation. More... | |
bool | empty (void) const |
template<typename U > | |
void | push (U &&elem, const size_t index) |
const T & | front (void) const |
T & | front (void) |
void | pop (void) |
size_t | capacity (void) const |
How many elements can be stored? More... | |
OrderedQueue is a templated queue with an ordering index for push. The ordering index is used to control the order at the queue front.
Pothos::Util::OrderedQueue< T >::OrderedQueue | ( | void | ) |
Construct a size-zero ordered queue.
Pothos::Util::OrderedQueue< T >::OrderedQueue | ( | const size_t | capacity | ) |
Construct a new ordered queue – with space reservation.
size_t Pothos::Util::OrderedQueue< T >::capacity | ( | void | ) | const |
How many elements can be stored?
bool Pothos::Util::OrderedQueue< T >::empty | ( | void | ) | const |
Is this queue empty? The queue is empty when the front element is not available. Due to ordering, this queue can still be empty after push.
const T & Pothos::Util::OrderedQueue< T >::front | ( | void | ) | const |
Get access to the element at the front of the queue
T & Pothos::Util::OrderedQueue< T >::front | ( | void | ) |
Get access to the element at the front of the queue
void Pothos::Util::OrderedQueue< T >::pop | ( | void | ) |
Pop an element from the front of the queue.
void Pothos::Util::OrderedQueue< T >::push | ( | U && | elem, |
const size_t | index | ||
) |
Push an element into the queue.
elem | the new element to push |
index | the order of the element |