26 lines
414 B
C++
26 lines
414 B
C++
#ifndef EVENT_HANDLER_BASE_H
|
|
#define EVENT_HANDLER_BASE_H
|
|
|
|
#include <memory>
|
|
|
|
class Event;
|
|
class EventManager;
|
|
|
|
class EventHandlerBase
|
|
{
|
|
private:
|
|
static unsigned int s_nextId;
|
|
|
|
public:
|
|
EventHandlerBase();
|
|
virtual ~EventHandlerBase() = default;
|
|
virtual void handleBaseEvent(std::shared_ptr<const Event> event) = 0;
|
|
|
|
private:
|
|
const unsigned int m_id;
|
|
|
|
friend EventManager;
|
|
};
|
|
|
|
#endif // EVENT_HANDLER_BASE_H
|