|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
#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< WasmObjectInfo > | objectInfo (ObjectId id) |
| _WASM_OBJ_CALL std::vector< ObjectId > | allObjects () |
| _WASM_OBJ_CALL std::vector< WasmObjectInfo > | allObjectInfoList () |
| _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模块运行时协议,与对象管理相关的接口集合
| std::vector< WasmObjectInfo > ast::WasmRuntimeProtocol::allObjectInfoList | ( | ) |
获取所有对象信息
所有对象信息
| std::vector< ObjectId > ast::WasmRuntimeProtocol::allObjects | ( | ) |
获取所有对象ID
所有对象ID
| std::optional< std::string > ast::WasmRuntimeProtocol::classJsonSchemaStr | ( | const std::string & | typeName | ) |
获取类的JSON Schema
typeName 类名
| std::vector< std::string > ast::WasmRuntimeProtocol::getAllClassNames | ( | ) |
获取所有类名
所有类名
| std::optional< std::string > ast::WasmRuntimeProtocol::getAttrString | ( | ObjectId | id, |
| const std::string & | name ) |
获取对象属性
id 对象索引/对象ID
| name | 属性名 |
| std::optional< ObjectId > ast::WasmRuntimeProtocol::newObject | ( | const std::string & | typeName, |
| std::optional< ObjectId > | parentId = std::nullopt ) |
创建新对象
typeName 对象类型名
| parentId | 父对象ID |
| std::optional< WasmObjectInfo > ast::WasmRuntimeProtocol::objectInfo | ( | ObjectId | id | ) |
获取对象信息
id 对象索引/对象ID
| std::optional< std::string > ast::WasmRuntimeProtocol::objectToJsonStr | ( | ObjectId | id | ) |
将对象转换为JSON字符串
id 对象索引/对象ID
| std::optional< std::string > ast::WasmRuntimeProtocol::objectType | ( | ObjectId | id | ) |
获取对象类型
id 对象索引/对象ID
| errc_t ast::WasmRuntimeProtocol::removeObject | ( | ObjectId | id | ) |
移除对象
id 对象索引/对象ID
| errc_t ast::WasmRuntimeProtocol::setAttrString | ( | ObjectId | id, |
| const std::string & | name, | ||
| const std::string & | value ) |
设置对象属性
id 对象索引/对象ID
| name | 属性名 |
| value | 属性值 |