blob: 7993cbb868222c6f932aeef638bb470dffb796b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef PLUGIN_MANAGER_H
#define PLUGIN_MANAGER_H
#include <windows.h>
namespace fs = std::filesystem;
class Plugin;
class PluginManager
{
public:
const std::vector<Plugin>& GetLoadedPlugins() const;
const std::optional<Plugin> GetPlugin(HMODULE handle) const;
bool LoadPlugins(bool reloaded = false);
void LoadPlugin(fs::path path, bool reloaded = false);
void ReloadPlugins();
void RemovePlugin(HMODULE handle);
// callback triggers
void InformSqvmCreated(CSquirrelVM* sqvm) const;
void InformSqvmDestroying(CSquirrelVM* sqvm) const;
void InformDllLoad(HMODULE module, fs::path path) const;
void RunFrame() const;
private:
void InformAllPluginsInitialized() const;
std::vector<Plugin> plugins;
std::string pluginPath;
};
extern PluginManager* g_pPluginManager;
#endif
|