From b49be56d472a0222a5de4407348184c4889cd49c Mon Sep 17 00:00:00 2001 From: Jan Zenisek Date: Thu, 1 Feb 2024 13:19:17 +0100 Subject: [PATCH] updated data structures --- src/Configuration/DataStructures.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Configuration/DataStructures.cs b/src/Configuration/DataStructures.cs index 02d1f76..c138417 100644 --- a/src/Configuration/DataStructures.cs +++ b/src/Configuration/DataStructures.cs @@ -212,6 +212,8 @@ public Edge(string id, Node source, Node sink, string query = null) { Query = query; } + // TODO: add ports + public object Clone() { return new Edge(Id, Source, Sink, Query); } @@ -228,20 +230,30 @@ public class Node : ICloneable { public string FullyQualifiedTypename { get; set; } + public List Ports { get; set; } + public Node() { } - public Node(string id, string typename, string fullyQualifiedTypename) { + public Node(string id, string typename, string fullyQualifiedTypename, List ports) { Id = id; Typename = typename; FullyQualifiedTypename = fullyQualifiedTypename; + Ports = ports; } public object Clone() { - return new Node(Id, Typename, FullyQualifiedTypename); + return new Node(Id, Typename, FullyQualifiedTypename, Ports); } public string GetRoutingString(string delimiter) { return $"{Typename}{delimiter}{Id}"; } } + + public struct Port { + public string Id { get; set; } + public string Type { get; set; } // in/out + + public Port() { } + } }