From 7fe47a9d5b1727a61dc724523b530762f6d6ba19 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 30 Jun 2022 21:38:53 -0700 Subject: Restructure project --- core/src/Model/Workflow/Evaluation.hpp | 67 ---------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 core/src/Model/Workflow/Evaluation.hpp (limited to 'core/src/Model/Workflow/Evaluation.hpp') diff --git a/core/src/Model/Workflow/Evaluation.hpp b/core/src/Model/Workflow/Evaluation.hpp deleted file mode 100644 index 4d78872..0000000 --- a/core/src/Model/Workflow/Evaluation.hpp +++ /dev/null @@ -1,67 +0,0 @@ -#pragma once - -#include "Model/Workflow/Workflow.hpp" - -#include -#include -#include -#include - -class WorkflowEvaluationError -{ -public: - enum MessageType : int16_t - { - Error, - Warning, - }; - - enum PinType : int16_t - { - NoPin, - InputPin, - OutputPin, - }; - -public: - std::string Message; - size_t NodeId; - int PinId; - PinType PinType; - MessageType Type; - -public: - static const char* FormatMessageType(enum MessageType messageType); - static const char* FormatPinType(enum PinType pinType); - - std::string Format() const; -}; - -class WorkflowEvaluationContext -{ -private: - struct RuntimeNode; - struct RuntimeConnection; - - Workflow* mWorkflow; - std::vector mRuntimeNodes; - std::vector mRuntimeConnections; - std::vector mErrors; - std::vector mWarnings; - -public: - WorkflowEvaluationContext(Workflow& workflow); - - BaseValue* GetConnectionValue(size_t id, bool constant); - BaseValue* GetConnectionValue(const WorkflowNode::InputPin& inputPin); - void SetConnectionValue(size_t id, std::unique_ptr value); - void SetConnectionValue(const WorkflowNode::OutputPin& outputPin, std::unique_ptr value); - - void ReportError(std::string message, const WorkflowNode& node, int pinId, bool inputPin); - void ReportError(std::string message, const WorkflowNode& node); - void ReportWarning(std::string message, const WorkflowNode& node, int pinId, bool inputPin); - void ReportWarning(std::string message, const WorkflowNode& node); - - /// Run until all possible paths have been evaluated. - void Run(); -}; -- cgit v1.2.3-70-g09d2