Simplified XF 1.1.0
eventqueue.h
1#ifndef XF_INTERFACE_EVENT_QUEUE_H
2#define XF_INTERFACE_EVENT_QUEUE_H
3
4class XFEvent;
5
6namespace interface {
7
12{
13public:
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
22public:
23 XFEventQueue() = default;
24};
25
26} // namespace interface
27#endif // XF_INTERFACE_EVENT_QUEUE_H
Base class for all types of events and timeouts.
Definition: event.h:23
Interface to be implemented by the event queue.
Definition: eventqueue.h:12
virtual const XFEvent * front()=0
Returns pointer to next event to pop.
virtual void pop()=0
Pops the next event from the queue.
virtual bool empty() const =0
Returns true if no event is in the queue.
virtual bool pend()=0
Wait for the next event to arrive. Returns true if an event is in the queue.
virtual bool push(const XFEvent *pEvent, bool fromISR=false)=0
Pushes the given event onto the queue.