aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow/Workflow.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Model/Workflow/Workflow.hpp')
-rw-r--r--core/src/Model/Workflow/Workflow.hpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/core/src/Model/Workflow/Workflow.hpp b/core/src/Model/Workflow/Workflow.hpp
index 77341fa..7bcd349 100644
--- a/core/src/Model/Workflow/Workflow.hpp
+++ b/core/src/Model/Workflow/Workflow.hpp
@@ -19,34 +19,17 @@ class WorkflowConnection
public:
static constexpr auto kInvalidId = std::numeric_limits<size_t>::max();
- enum Direction
- {
- ManyToOne,
- OneToMany,
- };
-
- struct ConnectionPoint
- {
- size_t Node;
- int Pin;
-
- bool operator==(const ConnectionPoint&) const = default;
- };
-
- std::vector<ConnectionPoint> MultiConnections;
/// Used for `LinkId` when interfacing with imgui node editor. Runtime only (not saved to disk and generated when loading).
size_t UniqueId;
- ConnectionPoint SingleConnection;
- Direction ConnectionDirection;
+ size_t SourceNode;
+ size_t DestinationNode;
+ int SourcePin;
+ int DestinationPin;
public:
WorkflowConnection();
bool IsValid() const;
- std::span<ConnectionPoint> GetSourcePoints();
- std::span<const ConnectionPoint> GetSourcePoints() const;
- std::span<ConnectionPoint> GetDestinationPoints();
- std::span<const ConnectionPoint> GetDestinationPoints() const;
void DrawDebugInfo() const;
void ReadFrom(std::istream& stream);
@@ -89,13 +72,11 @@ protected:
size_t Connection = WorkflowConnection::kInvalidId;
BaseValue::Kind MatchingType = BaseValue::InvalidKind;
bool ConnectionToConst = false;
- bool AllowsMultipleConnections = false;
/// A constant connection connects from a user-specified constant value, feeding to a valid \c Destination and \c DestinationPin (i.e. input pins).
bool IsConstantConnection() const;
bool IsConnected() const;
BaseValue::Kind GetMatchingType() const;
- WorkflowConnection::Direction GetSupportedDirection() const;
};
struct OutputPin
@@ -108,7 +89,6 @@ protected:
bool IsConnected() const;
BaseValue::Kind GetMatchingType() const;
- WorkflowConnection::Direction GetSupportedDirection() const;
};
friend class Workflow;