Modified some function name in JSON related classes && Removed the Null flag for Json_Pair && Added function interfaces for exporting and importing configurations in the base node class && Added experimental operation testing for the workflow.

This commit is contained in:
2026-04-28 19:08:31 +08:00
parent f9f10209ca
commit df949ce460
6 changed files with 71 additions and 29 deletions
+4 -8
View File
@@ -65,7 +65,7 @@ public:
Json_Value operator[](size_t index) const;
// 是否为空
bool isNull(void) const;
bool isEmpty(void) const;
};
// Json 值定义
@@ -130,7 +130,6 @@ public:
class Json_Pair
{
private:
bool Null_Flag = true; // 空判定
std::string private_key_str; // 键
Json_Value private_value; // 值
public:
@@ -139,17 +138,14 @@ public:
Json_Value &value = this->private_value;
// 默认构造
Json_Pair() : Null_Flag(true) {};
Json_Pair() = default;
// 必要构造
Json_Pair(std::string key, Json_Value value) : Null_Flag(false), private_key_str(key), private_value(value) {};
Json_Pair(std::string key, Json_Value value) : private_key_str(key), private_value(value) {};
// 浅拷贝构造
Json_Pair(const Json_Pair &temp);
// 深拷贝
Json_Pair &operator=(const Json_Pair &another);
// 空判定
bool isNull() const;
};
// Json 对象
@@ -183,7 +179,7 @@ public:
Json_Value get(std::string key) const;
// 是否为空
bool isNull(void) const;
bool isEmpty(void) const;
};
#endif
+7
View File
@@ -6,6 +6,7 @@
#include "imgui.h"
#include "imnodes.h"
#include "ID_Generator.hpp"
#include "Json_Utilities.hpp"
// =====================================接口抽象======================================================
@@ -123,6 +124,12 @@ public:
// 获取关闭信号
virtual bool Get_CloseFlag(void);
// 获取节点配置参数
virtual Json_Arry Get_Arguments(void);
// 应用配置参数
virtual bool Apply_Arguments(Json_Arry Arg_Arry);
// 获取接口列表
std::vector<std::shared_ptr<Abs_Connector>> &Get_Connector_List(void);
};
+3
View File
@@ -73,6 +73,9 @@ public:
// 清除工作路由 true -> success / false -> failed
bool Clear_Process_Route(void);
// 开始执行工作流
bool Execute_Workflow(void);
// 清除整个工作区
void Clear_All(void);