add event system and use it to propagate to print traces
This commit is contained in:
25
src/lib/eventsystem/EventHandlerBase.h
Normal file
25
src/lib/eventsystem/EventHandlerBase.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user