载入中...
搜索中...
未找到
eve::plugins::Plugins类 参考
加载导出 eve_plugin_init 的原生动态库(dll / so / dylib)。 更多...
#include <Plugins.h>
类 eve::plugins::Plugins 继承关系图:
Public 成员函数 | |
| Module_REG (Plugins) | |
| Plugins () | |
| ~Plugins () override | |
| bool | load (const std::string &path) |
| Compatibility wrapper for loadPlugin; throws on failure, returns true on success. | |
| Result< void > | loadPlugin (const std::string &path) |
| Loads a plugin once; aliases of a canonical path identify the same plugin. | |
| Result< void > | reload (const std::string &path) |
| Publishes a new plugin generation without restarting the script VM. | |
| bool | unload (const std::string &path) |
| 插件为进程期驻留;该兼容方法始终返回 false。 | |
| bool | isLoaded (const std::string &path) const |
| 插件是否已加载。 | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
构造及析构函数说明
◆ Plugins()
|
default |
◆ ~Plugins()
|
overridedefault |
成员函数说明
◆ isLoaded()
| bool eve::plugins::Plugins::isLoaded | ( | const std::string & | path | ) | const |
◆ load()
| bool eve::plugins::Plugins::load | ( | const std::string & | path | ) |
Compatibility wrapper for loadPlugin; throws on failure, returns true on success.
在文件 Plugins.cpp 第 135 行定义.
引用了 loadPlugin(), path , 以及 result.
◆ loadPlugin()
| Result< void > eve::plugins::Plugins::loadPlugin | ( | const std::string & | path | ) |
Loads a plugin once; aliases of a canonical path identify the same plugin.
- 参数
-
path Dynamic library path, copied only for this operation.
- 返回
- Applied, NoOp if already loaded, or a diagnostic; failure preserves current bindings.
- 注解
- Main/script thread only; initializer may register modules, not re-enter loading. @cost Copies and links one binary and binds its classes per first load.
在文件 Plugins.cpp 第 132 行定义.
引用了 path.
被这些函数引用 load().
◆ Module_REG()
| eve::plugins::Plugins::Module_REG | ( | Plugins | ) |
◆ reload()
| Result< void > eve::plugins::Plugins::reload | ( | const std::string & | path | ) |
Publishes a new plugin generation without restarting the script VM.
- 参数
-
path Previously loaded library path, copied only for this operation.
- 返回
- Applied or a diagnostic. Failure retains the previous generation.
- 注解
- Main/script thread only. New constructors use fresh instances; old objects, classes and closures keep their original generation. No automatic state migration. Libraries and retired instances remain resident until process teardown. @cost Copies and links the binary and rebinds its classes on every call; retained code and instances consume memory per generation. Call at a reload boundary.
在文件 Plugins.cpp 第 133 行定义.
引用了 path.
◆ unload()
| bool eve::plugins::Plugins::unload | ( | const std::string & | path | ) |
该类的文档由以下文件生成:
- src/modules/plugins/Plugins.h
- src/modules/plugins/Plugins.cpp
Public 成员函数 继承自