55 auto status_monitor = std::make_shared<StatusMonitor>();
56 addStatusMonitor(status_monitor);
57 observed_queue->setStatusMonitor(status_monitor);
59 std::sort(priority_vector_.begin(), priority_vector_.end(), std::greater<QueuePriorityPair>());
69 const std::chrono::microseconds &duration)
override 72 bool is_dequeued =
false;
73 for (
auto &queue : priority_vector_)
75 is_dequeued = queue.observed_queue->dequeue(data, std::chrono::microseconds(0));
89 return static_cast<bool>(mask_);
105 observed_queue = queue;
106 priority_options = options;
virtual ~QueueDemux()=default
std::vector< QueuePriorityPair > priority_vector_
virtual void addSource(std::shared_ptr< IObservedQueue< T >>, PriorityOptions)=0
QueuePriorityPair(std::shared_ptr< IObservedQueue< T >> queue, PriorityOptions options)
std::shared_ptr< IObservedQueue< T > > observed_queue
void addSource(std::shared_ptr< IObservedQueue< T >>observed_queue, PriorityOptions priority_options) override
PriorityOptions priority_options
bool dequeue(T &data, const std::chrono::microseconds &duration) override