Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
EventService.hxx
Go to the documentation of this file.
1
38#ifndef _OPENLCB_EVENTSERVICE_HXX_
39#define _OPENLCB_EVENTSERVICE_HXX_
40
41// This is a workaround for missing shared_ptr.h causing compilation errors. We
42// do not use shared_ptr.
43#ifndef __CR2_C___4_6_2_BITS_SHARED_PTR_H__
44#define __CR2_C___4_6_2_BITS_SHARED_PTR_H__
45#endif
46
47#define DEBUG_EVENT_PERFORMANCE
48
49#include <memory>
50
51#include "utils/macros.h"
52#include "executor/Service.hxx"
53#include "openlcb/Defs.hxx"
54#include "openlcb/If.hxx"
55
56namespace openlcb
57{
58
59class Node;
60
61class EventIteratorFlow;
62
67class EventService : public Service
68{
69public:
74 EventService(If *iface);
76
79 void register_interface(If *iface);
80
81 class Impl;
82 Impl *impl()
83 {
84 return impl_.get();
85 }
86
90
91 static EventService *instance;
92
93private:
94 std::unique_ptr<Impl> impl_;
95};
96
97}; /* namespace openlcb */
98
99#endif // _OPENLCB_EVENTSERVICE_HXX_
This class implements an execution of tasks pulled off an input queue.
Definition Executor.hxx:64
Node information.
Definition Devtab.hxx:549
Collection of related state machines that pend on incoming messages.
PImpl class for the EventService.
Global Event Service.
bool event_processing_pending()
Returns true if there are outstanding events that are not yet handled.
void register_interface(If *iface)
Registers this global event handler with an interface.
Abstract class representing an OpenLCB Interface.
Definition If.hxx:185