eventqueue.h
#ifndef XF_INTERFACE_EVENT_QUEUE_H
#define XF_INTERFACE_EVENT_QUEUE_H
class XFEvent;
namespace interface {
class XFEventQueue
{
public:
virtual ~XFEventQueue() = default;
virtual bool empty() const = 0;
virtual bool push(const XFEvent * pEvent, bool fromISR = false) = 0;
virtual const XFEvent * front() = 0;
virtual void pop() = 0;
virtual bool pend() = 0;
public:
XFEventQueue() = default;
};
} // namespace interface
#endif // XF_INTERFACE_EVENT_QUEUE_H
XFEvent
Base class for all types of events and timeouts.
Definition: event.h:23
interface::XFEventQueue
Interface to be implemented by the event queue.
Definition: eventqueue.h:12
interface::XFEventQueue::front
virtual const XFEvent * front()=0
Returns pointer to next event to pop.
interface::XFEventQueue::pop
virtual void pop()=0
Pops the next event from the queue.
interface::XFEventQueue::empty
virtual bool empty() const =0
Returns true if no event is in the queue.
interface::XFEventQueue::pend
virtual bool pend()=0
Wait for the next event to arrive. Returns true if an event is in the queue.
interface::XFEventQueue::push
virtual bool push(const XFEvent *pEvent, bool fromISR=false)=0
Pushes the given event onto the queue.