|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
动态加载插件管理 更多...
类 | |
| struct | neforce::plugin_info |
| 插件信息结构 更多... | |
| struct | neforce::iplugin |
| 插件接口基类 更多... | |
| struct | neforce::plugin_deleter |
| 插件自定义删除器 更多... | |
| class | neforce::plugin_manager |
| 插件管理器单例类 更多... | |
宏定义 | |
| #define | NEFORCE_PLUGIN_CREATE_FUNC "create_plugin" |
| 插件创建函数名称 | |
| #define | NEFORCE_PLUGIN_DESTROY_FUNC "destroy_plugin" |
| 插件销毁函数名称 | |
类型定义 | |
| using | neforce::plugin_ptr = unique_ptr<iplugin, plugin_deleter> |
| 插件唯一指针类型 | |
函数 | |
| iplugin * | neforce::create_plugin () |
| 创建插件实例 | |
| void | neforce::destroy_plugin (iplugin *p) |
| 销毁插件实例 | |
动态加载插件管理
| #define NEFORCE_PLUGIN_CREATE_FUNC "create_plugin" |
| #define NEFORCE_PLUGIN_DESTROY_FUNC "destroy_plugin" |
| using neforce::plugin_ptr = unique_ptr<iplugin, plugin_deleter> |
| iplugin * neforce::create_plugin | ( | ) |
创建插件实例
此函数必须由插件实现并导出,用于创建插件实例。 返回的指针将由 destroy_plugin 函数销毁。
引用了 create_plugin().
被这些函数引用 create_plugin().
| void neforce::destroy_plugin | ( | iplugin * | p | ) |
销毁插件实例
| p | 要销毁的插件对象指针 |
此函数必须由插件实现并导出,用于销毁通过 create_plugin 创建的插件对象。释放所有相关资源。
引用了 destroy_plugin().
被这些函数引用 destroy_plugin().