Skip to content

Commit

Permalink
updated data structures
Browse files Browse the repository at this point in the history
  • Loading branch information
janzenisek committed Feb 1, 2024
1 parent 3f9e1e8 commit b49be56
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Configuration/DataStructures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -228,20 +230,30 @@ public class Node : ICloneable {

public string FullyQualifiedTypename { get; set; }

public List<Port> Ports { get; set; }

public Node() { }

public Node(string id, string typename, string fullyQualifiedTypename) {
public Node(string id, string typename, string fullyQualifiedTypename, List<Port> 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() { }
}
}

0 comments on commit b49be56

Please sign in to comment.