aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Model/Workflow/Nodes/NumericNodes.hpp
blob: 3c89708307baa0f9c52467cdf72b53e62749f29b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once

#include <Cplt/Model/Workflow/Workflow.hpp>

#include <cstddef>
#include <memory>
#include <variant>
#include <vector>

class NumericOperationNode : public WorkflowNode
{
public:
	enum OperationType
	{
		Addition,
		Subtraction,
		Multiplication,
		Division,

		InvalidType,
		TypeCount = InvalidType,
	};

private:
	OperationType mType;

public:
	static Kind OperationTypeToNodeKind(OperationType type);
	static OperationType NodeKindToOperationType(Kind kind);
	static bool IsInstance(const WorkflowNode* node);
	NumericOperationNode(OperationType type);

	virtual void Evaluate(WorkflowEvaluationContext& ctx) override;
};

class NumericExpressionNode : public WorkflowNode
{
public:
	static bool IsInstance(const WorkflowNode* node);
	NumericExpressionNode();

	// TODO
	virtual void Evaluate(WorkflowEvaluationContext& ctx) override;
};