2 #ifndef _YI_EVENT_HANDLER_H_ 3 #define _YI_EVENT_HANDLER_H_ 29 typedef std::vector<std::shared_ptr<CYIEventFilterProxy>> YI_EVENT_FILTER_LIST;
69 bool PreFilter(
const std::shared_ptr<CYIEventDispatcher> &pDispatcher,
CYIEvent *pEvent);
76 bool PostFilter(
const std::shared_ptr<CYIEventDispatcher> &pDispatcher,
CYIEvent *pEvent);
96 virtual bool HandleEvent(
const std::shared_ptr<CYIEventDispatcher> &pDispatcher,
CYIEvent *pEvent) = 0;
103 std::shared_ptr<CYIEventHandlerProxy> m_pEventHandlerProxy;
104 YI_EVENT_FILTER_LIST m_eventFilterList;
void EnableEvents(bool bEnable)
bool RegisterEventFilter(CYIEventFilter *pFilter)
Allows registering of event filters which can be used to perform processing on an event before and af...
Definition: YiEventHandler.h:25
Definition: YiMutex.h:110
Base class for events.
Definition: YiEvent.h:489
bool PreFilter(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
Proxy for a CYIEventFilter allowing safe destruction of the internal event filter objects...
Definition: YiEventFilterProxy.h:24
virtual bool HandleEvent(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)=0
bool m_bEnableEvents
Definition: YiEventHandler.h:99
virtual ~CYIEventHandler()
bool PostFilter(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
Stores, queues and dispatches events as well as sending notifications to IYIEventDispatcherListener o...
Definition: YiEventDispatcher.h:65
Allows children that inherit from this class to implement processing before and after events are hand...
Definition: YiEventFilter.h:24
bool UnregisterEventFilter(CYIEventFilter *pFilter)
Proxy for a CYIEventHandler allowing safe destruction of the internal event handler objects...
Definition: YiEventHandlerProxy.h:26
CYIEventHandler & operator=(const CYIEventHandler &)
bool AreEventsEnabled() const