aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow/Workflow.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-05-06 21:56:40 -0700
committerrtk0c <[email protected]>2021-05-06 21:56:40 -0700
commit1fd1e4b5f2418e3ac2909658993bfedb615537ec (patch)
tree6de080d2273890f8a74d7fcd3572bb44f44ac545 /core/src/Model/Workflow/Workflow.hpp
parent538e804fc9beb83e711a210ffbb6badc15f285d5 (diff)
Change brace style to on new line, add initial deliveries view when an order entry is selected
Diffstat (limited to 'core/src/Model/Workflow/Workflow.hpp')
-rw-r--r--core/src/Model/Workflow/Workflow.hpp44
1 files changed, 30 insertions, 14 deletions
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 <variant>
#include <vector>
-class WorkflowConnection {
+class WorkflowConnection
+{
public:
static constexpr auto kInvalidId = std::numeric_limits<size_t>::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<size_t>::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<size_t> UnsatisfiedNodes;
};
- struct GraphUpdate_UnreachableNodes {
+ struct GraphUpdate_UnreachableNodes
+ {
std::vector<size_t> UnreachableNodes;
};
@@ -228,7 +243,8 @@ public:
/* Serialization */
- enum ReadResult {
+ enum ReadResult
+ {
ReadSuccess,
ReadInvalidVersion,
};