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

#include <WasmRuntimeProtocol.hpp>

Public 成员函数

_WASM_OBJ_CALL errc_t setAttrString (ObjectId id, const std::string &name, const std::string &value)
 
_WASM_OBJ_CALL errc_t setAttrDouble (ObjectId id, const std::string &name, double value)
 
_WASM_OBJ_CALL errc_t setAttrInt (ObjectId id, const std::string &name, int value)
 
_WASM_OBJ_CALL errc_t setAttrBool (ObjectId id, const std::string &name, bool value)
 
_WASM_OBJ_CALL errc_t setAttrObject (ObjectId id, const std::string &name, ObjectId value)
 
_WASM_OBJ_CALL std::optional< std::string > getAttrString (ObjectId id, const std::string &name)
 
_WASM_OBJ_CALL std::optional< double > getAttrDouble (ObjectId id, const std::string &name)
 
_WASM_OBJ_CALL std::optional< int > getAttrInt (ObjectId id, const std::string &name)
 
_WASM_OBJ_CALL std::optional< bool > getAttrBool (ObjectId id, const std::string &name)
 
_WASM_OBJ_CALL std::optional< ObjectId > getAttrObject (ObjectId id, const std::string &name)
 
_WASM_OBJ_CALL std::optional< std::string > objectType (ObjectId id)
 
_WASM_OBJ_CALL std::optional< WasmObjectInfoobjectInfo (ObjectId id)
 
_WASM_OBJ_CALL std::vector< ObjectId > allObjects ()
 
_WASM_OBJ_CALL std::vector< WasmObjectInfoallObjectInfoList ()
 
_WASM_OBJ_CALL std::optional< ObjectId > newObject (const std::string &typeName, std::optional< ObjectId > parentId=std::nullopt)
 
_WASM_OBJ_CALL errc_t removeObject (ObjectId id)
 
_WASM_OBJ_CALL std::optional< std::string > objectToJsonStr (ObjectId id)
 
_WASM_OBJ_CALL std::optional< std::string > classJsonSchemaStr (const std::string &typeName)
 
_WASM_OBJ_CALL std::vector< std::string > getAllClassNames ()
 
_WASM_OBJ_CALL std::string handleToolCall (const std::string &toolCallJsonStr)
 

详细描述

WASM模块运行时协议,与对象管理相关的接口集合

成员函数说明

◆ allObjectInfoList()

std::vector< WasmObjectInfo > ast::WasmRuntimeProtocol::allObjectInfoList ( )

获取所有对象信息

所有对象信息

返回
所有对象信息

◆ allObjects()

std::vector< ObjectId > ast::WasmRuntimeProtocol::allObjects ( )

获取所有对象ID

所有对象ID

返回
所有对象ID

◆ classJsonSchemaStr()

std::optional< std::string > ast::WasmRuntimeProtocol::classJsonSchemaStr ( const std::string & typeName)

获取类的JSON Schema

typeName 类名

返回
JSON模式

◆ getAllClassNames()

std::vector< std::string > ast::WasmRuntimeProtocol::getAllClassNames ( )

获取所有类名

所有类名

返回
所有类名

◆ getAttrString()

std::optional< std::string > ast::WasmRuntimeProtocol::getAttrString ( ObjectId id,
const std::string & name )

获取对象属性

id 对象索引/对象ID

参数
name属性名
返回
属性值

◆ newObject()

std::optional< ObjectId > ast::WasmRuntimeProtocol::newObject ( const std::string & typeName,
std::optional< ObjectId > parentId = std::nullopt )

创建新对象

typeName 对象类型名

参数
parentId父对象ID
返回
对象ID

◆ objectInfo()

std::optional< WasmObjectInfo > ast::WasmRuntimeProtocol::objectInfo ( ObjectId id)

获取对象信息

id 对象索引/对象ID

返回
对象信息

◆ objectToJsonStr()

std::optional< std::string > ast::WasmRuntimeProtocol::objectToJsonStr ( ObjectId id)

将对象转换为JSON字符串

id 对象索引/对象ID

返回
JSON字符串

◆ objectType()

std::optional< std::string > ast::WasmRuntimeProtocol::objectType ( ObjectId id)

获取对象类型

id 对象索引/对象ID

返回
对象类型名

◆ removeObject()

errc_t ast::WasmRuntimeProtocol::removeObject ( ObjectId id)

移除对象

id 对象索引/对象ID

返回
错误码

◆ setAttrString()

errc_t ast::WasmRuntimeProtocol::setAttrString ( ObjectId id,
const std::string & name,
const std::string & value )

设置对象属性

id 对象索引/对象ID

参数
name属性名
value属性值
返回
错误码

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