diff options
author | rtk0c <[email protected]> | 2021-05-31 12:27:58 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-05-31 12:27:58 -0700 |
commit | 8157678eba97d7de5c53b424a9866d327392bbd9 (patch) | |
tree | 26348a926040ccfc91f74cdfe49f7153db271f87 /core/src/Model/Workflow/Workflow.hpp | |
parent | eef2514908cdec3ec02888b7467cc877d33c1ceb (diff) |
Fix standard incompetence found by MSVC
- requires-expression still not working, because they aren't supported yet outside of a concept
Diffstat (limited to 'core/src/Model/Workflow/Workflow.hpp')
-rw-r--r-- | core/src/Model/Workflow/Workflow.hpp | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/core/src/Model/Workflow/Workflow.hpp b/core/src/Model/Workflow/Workflow.hpp index ded9bfb..161400e 100644 --- a/core/src/Model/Workflow/Workflow.hpp +++ b/core/src/Model/Workflow/Workflow.hpp @@ -5,6 +5,7 @@ #include "cplt_fwd.hpp" #include <imgui_node_editor.h> +#include <any> #include <cstddef> #include <cstdint> #include <filesystem> @@ -240,34 +241,27 @@ public: /* Graph rebuild */ - struct GraphUpdateResult + enum GraphUpdateResult { - struct Success - { - }; - - struct NoWorkToDo - { - }; - - struct UnsatisfiedDependencies - { - std::vector<uint32_t> UnsatisfiedNodes; - }; - - struct UnreachableNodes - { - std::vector<uint32_t> UnreachableNodes; - }; - - using T = std::variant< - Success, - NoWorkToDo, - UnsatisfiedDependencies, - UnreachableNodes>; + /// Successfully rebuilt graph dependent data. + /// Details: nothing is written. + GUR_Success, + /// Nothing has changed since last time UpdateGraph() was called. + /// Details: nothing is written. + GUR_NoWorkToDo, + /// Details: list of nodes is written. + GUR_UnsatisfiedDependencies, + /// Details: list of nodes is written. + GUR_UnreachableNodes, }; - GraphUpdateResult::T UpdateGraph(); + using GraphUpdateDetails = std::variant< + // Case: nothing + std::monostate, + // Case: list of nodes (ids) + std::vector<uint32_t>>; + + GraphUpdateResult UpdateGraph(GraphUpdateDetails* details = nullptr); /* Serialization */ |