🛰️航天仿真算法库 SpaceAST 0.4.0
载入中...
搜索中...
未找到
ast::PluginLoader类 参考

#include <PluginLoader.hpp>

Public 成员函数

errc_t load (StringView filepath)
 
bool isPlugin () const
 
const std::vector< PluginEntry > & entries () const
 
const std::string & filepath () const
 
PluginInstance * instance ()
 

详细描述

单个插件动态库加载器

加载后读取元数据并解析为 PluginEntry 列表,按需获取插件的根对象 插件动态库加载后将常驻到进程退出

成员函数说明

◆ instance()

PluginInstance * ast::PluginLoader::instance ( )

获取插件根对象

返回
根对象指针;不是插件或入口缺失时返回 nullptr

◆ load()

errc_t ast::PluginLoader::load ( StringView filepath)

加载动态库并解析其元数据

参数
filepath动态库路径
返回
eNoError 表示这是一个合法插件;其他错误码表示加载失败或不是插件

该类的文档由以下文件生成: