Pothos  0.4.1-gb758ed46
The Pothos dataflow programming software suite
Public Member Functions | List of all members
Pothos::Util::OrderedQueue< T > Class Template Reference

#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...
 

Detailed Description

template<typename T>
class Pothos::Util::OrderedQueue< T >

OrderedQueue is a templated queue with an ordering index for push. The ordering index is used to control the order at the queue front.

Constructor & Destructor Documentation

template<typename T >
Pothos::Util::OrderedQueue< T >::OrderedQueue ( void  )

Construct a size-zero ordered queue.

template<typename T >
Pothos::Util::OrderedQueue< T >::OrderedQueue ( const size_t  capacity)

Construct a new ordered queue – with space reservation.

Member Function Documentation

template<typename T >
size_t Pothos::Util::OrderedQueue< T >::capacity ( void  ) const

How many elements can be stored?

template<typename T >
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.

template<typename T >
const T & Pothos::Util::OrderedQueue< T >::front ( void  ) const

Get access to the element at the front of the queue

template<typename T >
T & Pothos::Util::OrderedQueue< T >::front ( void  )

Get access to the element at the front of the queue

template<typename T >
void Pothos::Util::OrderedQueue< T >::pop ( void  )

Pop an element from the front of the queue.

template<typename T >
template<typename U >
void Pothos::Util::OrderedQueue< T >::push ( U &&  elem,
const size_t  index 
)

Push an element into the queue.

Parameters
elemthe new element to push
indexthe order of the element

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