Ocular Engine
AEventListener.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EVENTS_EVENT_LISTENER__H__
19 #define __H__OCULAR_EVENTS_EVENT_LISTENER__H__
20 
21 #include "AEvent.hpp"
22 #include <memory>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Core
37  {
38  class EventManager;
39 
43  class AEventListener : public std::enable_shared_from_this<AEventListener>
44  {
45  friend class EventManager;
46 
47  public:
48 
49  protected:
50 
54  virtual bool onEvent(std::shared_ptr<AEvent> event) = 0;
55 
56  private:
57 
58  };
59  }
63 }
68 //------------------------------------------------------------------------------------------
69 
70 #endif
virtual bool onEvent(std::shared_ptr< AEvent > event)=0
Definition: AEventListener.hpp:43
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Abstract base class of all event objects.
Definition: EventManager.hpp:43