14#ifndef IOMANAGER_INCLUDE_IOMANAGER_QUEUE_HPP_
15#define IOMANAGER_INCLUDE_IOMANAGER_QUEUE_HPP_
49 explicit Queue(
const std::string& name)
106 name <<
": Unable to " << func_name <<
" within timeout period (timeout period was " << timeout
108 ((std::string)name)((std::string)func_name)((
int)timeout))
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
The QueueBase class allows to address generic behavior of any Queue implementation.
virtual size_t get_num_elements() const =0
virtual size_t get_capacity() const =0
Get the capacity (max size) of the queue.
Implementations of the Queue class are responsible for relaying data between DAQModules within a DAQ ...
virtual bool can_pop() const
Determine whether the Queue may be popped from.
Queue(const Queue &)=delete
virtual void pop(value_t &val, const duration_t &timeout)=0
Pop the first value off of the queue.
virtual void push(value_t &&val, const duration_t &timeout)=0
Push a value onto the Queue.
virtual bool try_push(value_t &&val, const duration_t &timeout)=0
virtual bool can_push() const
Determine whether the Queue may be pushed onto.
std::chrono::milliseconds duration_t
Base duration type for timeouts.
Queue & operator=(Queue &&)=default
Queue(const std::string &name)
Queue Constructor.
Queue & operator=(const Queue &)=delete
T value_t
Type stored in the Queue.
virtual bool try_pop(value_t &val, const duration_t &timeout)=0