37 #include <forward_list> 39 #include <unordered_map> 59 std::atomic<int32_t> _useCount;
64 typedef std::unordered_map<IEventSinkBase *, PEventHandler>
EventHandlers;
78 virtual void resetEventHandler();
92 virtual PEventHandler addEventHandler(
IEventSinkBase *eventHandler);
93 virtual std::vector<PEventHandler> addEventHandlers(EventHandlers eventHandlers);
94 virtual void removeEventHandler(PEventHandler eventHandler);
95 virtual EventHandlers getEventHandlers();
97 int32_t _currentId = 0;
IEventSinkBase * handler()
Definition: IEvents.cpp:58
EventHandlers _eventHandlers
Definition: IEvents.h:99
std::shared_ptr< EventHandler > PEventHandler
Definition: IEvents.h:63
Definition: BaseLib.cpp:34
IEventSinkBase()
Definition: IEvents.h:68
std::mutex _eventHandlerMutex
Definition: IEvents.h:98
int32_t id()
Definition: IEvents.cpp:50
void unlock()
Definition: IEvents.cpp:66
void invalidate()
Definition: IEvents.cpp:70
void lock()
Definition: IEvents.cpp:62
virtual ~IEventSinkBase()
Definition: IEvents.h:69
int32_t useCount()
Definition: IEvents.cpp:54
std::unordered_map< IEventSinkBase *, PEventHandler > EventHandlers
Definition: IEvents.h:64
virtual ~EventHandler()
Definition: IEvents.cpp:47
EventHandler(int32_t id)
Definition: IEvents.cpp:36