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