Ocular Engine
EventSnooper.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EVENTS_EVENT_SNOOPER__H__
19 #define __H__OCULAR_EVENTS_EVENT_SNOOPER__H__
20 
21 #include "Events/EventManager.hpp"
22 
23 #include <string>
24 #include <memory>
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Core
39  {
54  {
55  public:
56 
57  EventSnooper();
58  ~EventSnooper();
59 
63  void setIgnoreDuplicates(bool ignore);
64 
70  void setIgnorePriorityLevel(Priority priority, bool ignore);
71 
72  protected:
73 
74  virtual bool onEvent(std::shared_ptr<AEvent> event);
75 
76  private:
77 
78  bool m_IgnoreDuplicates;
79  std::string m_LastEventType;
80 
81  bool m_IgnorePriorityMonitor;
82  bool m_IgnorePriorityCritical;
83  bool m_IgnorePriorityHigh;
84  bool m_IgnorePriorityMedium;
85  bool m_IgnorePriorityLow;
86  };
87  }
91 }
96 //------------------------------------------------------------------------------------------
97 
98 #endif
void setIgnoreDuplicates(bool ignore)
Definition: EventSnooper.cpp:51
Definition: AEventListener.hpp:43
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual bool onEvent(std::shared_ptr< AEvent > event)
Definition: EventSnooper.cpp:89
void setIgnorePriorityLevel(Priority priority, bool ignore)
Definition: EventSnooper.cpp:56
Definition: EventSnooper.hpp:53