CppPlugins/inc/plugin.h

27 lines
417 B
C++

#pragma once
#include <jni.h>
#include <map>
#include <string>
#include "event.h"
//fwd declr
class CppPlugin;
//function pointer
typedef void (*eventfptr)(CppPlugin*, Event*);
typedef CppPlugin* (*initfptr)();
class CppPlugin {
public:
void* handle;
virtual void onLoad();
virtual void onEnable();
virtual void onDisable();
virtual std::map<std::string, eventfptr> getEvents();
virtual ~CppPlugin();
};