Implemented Show() method for the connector base class; all inheriting connectors no longer need to maintain their own separate Show() methods. && Assigned distinct drawing colors for exclusive input type connectors and their associated connections. && Improved the workflow packet passing execution process among existing connectors. && Removed some redundant code.

This commit is contained in:
2026-05-19 20:18:50 +08:00
parent 35636fd438
commit 80a18b6a79
4 changed files with 101 additions and 130 deletions
+20 -38
View File
@@ -84,8 +84,8 @@ public:
// 获取套接字字符串
virtual const char *Get_Socket_Str(void);
// 绘制连接点
virtual void Show(void) = 0;
// 默认风格连接点绘制
virtual void Show(void);
};
// =====================================节点抽象======================================================
@@ -156,20 +156,6 @@ public:
// ====================================接口类声明================================================
// Boolean 状态输出接口
class Boolean_OutPut_Connector : public Abs_Connector
{
public:
// 显式禁用默认构造
Boolean_OutPut_Connector() = delete;
// 必要构造
explicit Boolean_OutPut_Connector(Independent_ID_Generator *ID_Generator);
// 绘制接口
virtual void Show(void);
};
// Boolean 状态输入接口
class Boolean_InPut_Connector : public Abs_Connector
{
@@ -178,24 +164,18 @@ public:
Boolean_InPut_Connector() = delete;
// 必要构造
explicit Boolean_InPut_Connector(Independent_ID_Generator *ID_Generator, bool exclusive_flag = false);
// 绘制接口
virtual void Show(void);
explicit Boolean_InPut_Connector(Independent_ID_Generator *ID_Generator, bool exclusive_flag = false) : Abs_Connector(ID_Generator, exclusive_flag ? CONNECTOR_TYPE_INPUT_EXCLUSIVE : CONNECTOR_TYPE_INPUT, "Boolean") {}
};
// DLT信息输出接口
class MSG_OutPut_Connector : public Abs_Connector
// Boolean 状态输出接口
class Boolean_OutPut_Connector : public Abs_Connector
{
public:
// 显式禁用默认构造
MSG_OutPut_Connector() = delete;
Boolean_OutPut_Connector() = delete;
// 必要构造
explicit MSG_OutPut_Connector(Independent_ID_Generator *ID_Generator);
// 绘制接口
virtual void Show(void);
explicit Boolean_OutPut_Connector(Independent_ID_Generator *ID_Generator) : Abs_Connector(ID_Generator, CONNECTOR_TYPE_OUTPUT, "Boolean") {}
};
// DLT信息输入接口
@@ -206,10 +186,18 @@ public:
MSG_InPut_Connector() = delete;
// 必要构造
explicit MSG_InPut_Connector(Independent_ID_Generator *ID_Generator, bool exclusive_flag = false);
explicit MSG_InPut_Connector(Independent_ID_Generator *ID_Generator, bool exclusive_flag = false) : Abs_Connector(ID_Generator, exclusive_flag ? CONNECTOR_TYPE_INPUT_EXCLUSIVE : CONNECTOR_TYPE_INPUT, "DLT MSG") {}
};
// 绘制接口
virtual void Show(void);
// DLT信息输出接口
class MSG_OutPut_Connector : public Abs_Connector
{
public:
// 显式禁用默认构造
MSG_OutPut_Connector() = delete;
// 必要构造
explicit MSG_OutPut_Connector(Independent_ID_Generator *ID_Generator) : Abs_Connector(ID_Generator, CONNECTOR_TYPE_OUTPUT, "DLT MSG") {}
};
// CSV 列输入接口
@@ -220,10 +208,7 @@ public:
CSV_Column_Input_Connector() = delete;
// 必要构造
explicit CSV_Column_Input_Connector(Independent_ID_Generator *ID_Generator, bool exclusive_flag = false);
// 绘制接口
virtual void Show(void);
explicit CSV_Column_Input_Connector(Independent_ID_Generator *ID_Generator, bool exclusive_flag = false) : Abs_Connector(ID_Generator, exclusive_flag ? CONNECTOR_TYPE_INPUT_EXCLUSIVE : CONNECTOR_TYPE_INPUT, "CSV Column") {}
};
// CSV 列输出接口
@@ -234,10 +219,7 @@ public:
CSV_Column_Output_Connector() = delete;
// 必要构造
explicit CSV_Column_Output_Connector(Independent_ID_Generator *ID_Generator);
// 绘制接口
virtual void Show(void);
explicit CSV_Column_Output_Connector(Independent_ID_Generator *ID_Generator) : Abs_Connector(ID_Generator, CONNECTOR_TYPE_OUTPUT, "CSV Column") {}
};
// ====================================节点类声明================================================
+5
View File
@@ -24,6 +24,11 @@ protected:
int id = -1; // 边ID
int source_connector_id = -1; // 源连接点
int target_connector_id = -1; // 目标连接点
enum Edge_Type_Enum
{
EDGE_TYPE_NORMAL, // 普通边
EDGE_TYPE_EXCLUSIVE, // 独占边
} type = EDGE_TYPE_NORMAL;
} Edge;
// 数据池