#include "queuemux.hh"
Classes | |
class | Iter |
struct | Ptr |
Public Types | |
using | iterator = Iter |
using | Priority = decltype(QueueMultiplexer_priority(std::declval< const ValueType & >())) |
using | ValueType = std::remove_reference_t< decltype(*std::declval< ForwardIterator >())> |
Public Member Functions | |
template<class IterableContainer > | |
bool | assign (const std::array< const IterableContainer *, MAXQUEUES > &queues) |
iterator | begin () |
size_t | count_pending () const noexcept |
iterator | end () |
bool | more () const noexcept |
const ValueType & | peek () noexcept |
const ValueType & | pop () noexcept |
QueueMultiplexer () | |
Public Attributes | |
ssize_t | current |
Priority | first |
ssize_t | n_queues |
Priority | next |
std::array< Ptr, MAXQUEUES > | ptrs |
Multiplexer to pop from multiple Queues, while preserving priorities. Order for values at the same priority is unstable. Relies on unqualified calls to `Priority QueueMultiplexer_priority (const ValueType&)`.
using ValueType = std::remove_reference_t<decltype (*std::declval<ForwardIterator>())> |
using Priority = decltype (QueueMultiplexer_priority (std::declval<const ValueType&>())) |
QueueMultiplexer | ( | ) |
bool assign | ( | const std::array< const IterableContainer *, MAXQUEUES > & | queues | ) |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
iterator begin | ( | ) |
iterator end | ( | ) |
ssize_t n_queues |
ssize_t current |
Priority first |
Priority next |
std::array<Ptr, MAXQUEUES> ptrs |