载入中...
搜索中...
未找到
Plugins.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Module.h"
6
7#include <string>
8#include <unordered_map>
9
10namespace eve::plugins {
11
14public:
17 ~Plugins() override;
18
20 bool load(const std::string& path);
22 bool unload(const std::string& path);
24 bool isLoaded(const std::string& path) const;
25
26private:
27 struct Handle {
28 void* native = nullptr;
29 std::string path;
30 };
31
32 std::unordered_map<std::string, Handle> loaded_;
33};
34
35} // namespace eve::plugins
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
std::string path
Definition PlayHost.cpp:110
EVENGINE_API_FOUNDATION public API.
Definition Module.h:46
加载导出 eve_plugin_init 的原生动态库(dll / so / dylib)。
Definition Plugins.h:13