aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow/Workflow.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-06-13 17:16:46 -0700
committerrtk0c <[email protected]>2021-06-13 17:16:46 -0700
commitd3a9d7565b18404b2042c9dc025cc690250cb50c (patch)
tree4ae8a189326ff21bdf762b7d1bcb8f960aa5ea29 /core/src/Model/Workflow/Workflow.hpp
parentcf05728bc11aae1bb9545d4b0242a36dd14c7061 (diff)
Move UI_Workflows.cpp > WorkflowCategory to be a part of WorkflowNode's RTTI
(cherry picked from commit f45084562cfc95392b4dfb968dd215c25be3fc67)
Diffstat (limited to 'core/src/Model/Workflow/Workflow.hpp')
-rw-r--r--core/src/Model/Workflow/Workflow.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/src/Model/Workflow/Workflow.hpp b/core/src/Model/Workflow/Workflow.hpp
index 9c809bf..cba0d72 100644
--- a/core/src/Model/Workflow/Workflow.hpp
+++ b/core/src/Model/Workflow/Workflow.hpp
@@ -7,6 +7,7 @@
#include <imgui_node_editor.h>
#include <cstddef>
+#include <span>
#include <cstdint>
#include <filesystem>
#include <functional>
@@ -72,6 +73,19 @@ public:
KindCount = InvalidKind,
};
+ enum Category
+ {
+ CG_Numeric,
+ CG_Text,
+ CG_Document,
+ CG_UserInput,
+ CG_SystemInput,
+ CG_Output,
+
+ InvalidCategory,
+ CategoryCount = InvalidCategory,
+ };
+
struct InputPin
{
uint32_t Connection = WorkflowConnection::kInvalidId;
@@ -108,7 +122,10 @@ protected:
public:
static const char* FormatKind(Kind kind);
+ static const char* FormatCategory(Category category);
static const char* FormatType(Type type);
+ static Category QueryCategory(Kind kind);
+ static std::span<const Kind> QueryCategoryMembers(Category category);
static std::unique_ptr<WorkflowNode> CreateByKind(Kind kind);
static bool IsInstance(const WorkflowNode* node);