You.i Engine
YiEventFilter.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_EVENT_FILTER_H_
3 #define _YI_EVENT_FILTER_H_
4 
5 #include "framework/YiPredef.h"
6 
7 #include <memory>
8 
14 class CYIEvent;
15 class CYIEventDispatcher;
16 class CYIEventHandler;
18 
25 {
26  friend class CYIEventDispatcher;
27  friend class CYIEventHandler;
28 
29 public:
31  CYIEventFilter(const CYIEventFilter &other);
32  virtual ~CYIEventFilter();
33 
35 
39  virtual bool PreFilterEvent(const std::shared_ptr<CYIEventDispatcher> &pDispatcher, CYIEvent *pEvent, CYIEventHandler *pDestination) = 0;
40 
44  virtual bool PostFilterEvent(const std::shared_ptr<CYIEventDispatcher> &pDispatcher, CYIEvent *pEvent, CYIEventHandler *pDestination) = 0;
45 
46 private:
47  std::shared_ptr<CYIEventFilterProxy> m_pEventFilterProxy;
48 };
49 
52 #endif /* _YI_EVENT_FILTER_H_ */
Allows registering of event filters which can be used to perform processing on an event before and af...
Definition: YiEventHandler.h:25
Base class for events.
Definition: YiEvent.h:27
CYIEventFilter & operator=(const CYIEventFilter &other)
Proxy for a CYIEventFilter allowing safe destruction of the internal event filter objects...
Definition: YiEventFilterProxy.h:24
virtual bool PostFilterEvent(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent, CYIEventHandler *pDestination)=0
Stores, queues and dispatches events as well as sending notifications to IYIEventDispatcherListener o...
Definition: YiEventDispatcher.h:66
virtual bool PreFilterEvent(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent, CYIEventHandler *pDestination)=0
Allows children that inherit from this class to implement processing before and after events are hand...
Definition: YiEventFilter.h:24
virtual ~CYIEventFilter()