Simplified XF 1.1.0

eventqueue.h
1#ifndef XF_INTERFACE_EVENT_QUEUE_H
2#define XF_INTERFACE_EVENT_QUEUE_H
3
4 class XFEvent;
5
6 namespace interface {
7
11 class XFEventQueue
12{
13 public:
14 virtual ~XFEventQueue() = default;
15
16 virtual bool empty() const = 0;
17 virtual bool push(const XFEvent * pEvent, bool fromISR = false) = 0;
18 virtual const XFEvent * front() = 0;
19 virtual void pop() = 0;
20 virtual bool pend() = 0;
21
22 public:
23 XFEventQueue() = default;
24};
25
26} // namespace interface
27#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.