载入中...
搜索中...
未找到
src
modules
plugins
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
10
namespace
eve::plugins
{
11
13
class
EVENGINE_API_FOUNDATION
Plugins
:
public
Module
{
14
public
:
15
Module_REG
(
Plugins
);
16
Plugins
();
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
26
private
:
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
Export.h
EVENGINE_API_FOUNDATION
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition
Export.h:106
Module.h
path
std::string path
Definition
PlayHost.cpp:110
eve::Module
EVENGINE_API_FOUNDATION public API.
Definition
Module.h:46
eve::plugins::Plugins
加载导出 eve_plugin_init 的原生动态库(dll / so / dylib)。
Definition
Plugins.h:13
eve::plugins::Plugins::Plugins
Plugins()
eve::plugins::Plugins::Module_REG
Module_REG(Plugins)
eve::plugins
Definition
Plugins.cpp:16