Files
eUi/include/pluginBase.h
T

28 lines
561 B
C++

class Event;
enum pluginState
{
running,
stop
};
class IPlugin {
public:
std::string name;
virtual ~IPlugin() {};
virtual void onEvent(const Event& event) {};
virtual void init() {};
virtual bool start() { return true; };
virtual bool stop() { return true; }
virtual pluginState getState() { return pluginState::running; };
};
class Event {
public:
enum EventType { EVENT_TYPE_A, EVENT_TYPE_B };
Event(EventType type, int data) : type(type), data(data) {}
EventType type;
int data;
};
#pragma once