From 1fd1e4b5f2418e3ac2909658993bfedb615537ec Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 6 May 2021 21:56:40 -0700 Subject: Change brace style to on new line, add initial deliveries view when an order entry is selected --- core/src/Model/Workflow/Workflow.hpp | 44 ++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'core/src/Model/Workflow/Workflow.hpp') diff --git a/core/src/Model/Workflow/Workflow.hpp b/core/src/Model/Workflow/Workflow.hpp index 139a96e..f26fff9 100644 --- a/core/src/Model/Workflow/Workflow.hpp +++ b/core/src/Model/Workflow/Workflow.hpp @@ -14,16 +14,19 @@ #include #include -class WorkflowConnection { +class WorkflowConnection +{ public: static constexpr auto kInvalidId = std::numeric_limits::max(); - enum Direction { + enum Direction + { ManyToOne, OneToMany, }; - struct ConnectionPoint { + struct ConnectionPoint + { size_t Node; int Pin; @@ -48,17 +51,20 @@ public: void WriteTo(std::ostream& stream); }; -class WorkflowNode { +class WorkflowNode +{ public: static constexpr auto kInvalidId = std::numeric_limits::max(); - enum Type { + enum Type + { InputType, TransformType, OutputType, }; - enum Kind { + enum Kind + { KD_NumericAddition, KD_NumericSubtraction, KD_NumericMultiplication, @@ -74,7 +80,8 @@ public: }; protected: - struct InputPin { + struct InputPin + { size_t Connection = WorkflowConnection::kInvalidId; BaseValue::Kind MatchingType = BaseValue::InvalidKind; bool ConnectionToConst = false; @@ -87,7 +94,8 @@ protected: WorkflowConnection::Direction GetSupportedDirection() const; }; - struct OutputPin { + struct OutputPin + { size_t Connection = WorkflowConnection::kInvalidId; BaseValue::Kind MatchingType = BaseValue::InvalidKind; bool AllowsMultipleConnections = false; @@ -165,7 +173,8 @@ protected: void OnDetach() {} }; -class Workflow { +class Workflow +{ private: friend class WorkflowEvaluationContext; @@ -208,12 +217,18 @@ public: /* Graph rebuild */ - struct GraphUpdate_Success {}; - struct GraphUpdate_NoWorkToDo {}; - struct GraphUpdate_UnsatisfiedDependencies { + struct GraphUpdate_Success + { + }; + struct GraphUpdate_NoWorkToDo + { + }; + struct GraphUpdate_UnsatisfiedDependencies + { std::vector UnsatisfiedNodes; }; - struct GraphUpdate_UnreachableNodes { + struct GraphUpdate_UnreachableNodes + { std::vector UnreachableNodes; }; @@ -228,7 +243,8 @@ public: /* Serialization */ - enum ReadResult { + enum ReadResult + { ReadSuccess, ReadInvalidVersion, }; -- cgit v1.2.3-70-g09d2