From 4e5730e1fcef150ce2f13f52a278890589ca96ad Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 16 Apr 2021 16:49:28 -0700 Subject: More work on workflows - WorkflowStep -> WorkflowNode - Added initial kinds of WorkflowNode's --- core/src/Model/EvaluatedValue.hpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'core/src/Model/EvaluatedValue.hpp') diff --git a/core/src/Model/EvaluatedValue.hpp b/core/src/Model/EvaluatedValue.hpp index 838fc39..880fd3e 100644 --- a/core/src/Model/EvaluatedValue.hpp +++ b/core/src/Model/EvaluatedValue.hpp @@ -6,21 +6,21 @@ class BaseValue { public: - enum Type { - NumericType, - TextType, - DateTimeType, + enum Kind { + KD_Numeric, + KD_Text, + KD_DateTime, /// An unspecified type, otherwise known as "any" in some contexts. - InvalidType, - TypeCount = InvalidType, + KindInvalid, + KindCount = KindInvalid, }; private: - Type mType; + Kind mKind; public: - BaseValue(Type type); + BaseValue(Kind kind); virtual ~BaseValue() = default; BaseValue(const BaseValue&) = delete; @@ -28,7 +28,7 @@ public: BaseValue(BaseValue&&) = default; BaseValue& operator=(BaseValue&&) = default; - Type GetType() const; + Kind GetKind() const; }; class NumericValue : public BaseValue { @@ -36,8 +36,10 @@ private: double mValue; public: + static bool IsInstance(const BaseValue* value); NumericValue(); + std::string GetString() const; int64_t GetInt() const; double GetValue() const; void SetValue(double value); @@ -48,7 +50,9 @@ private: std::string mValue; public: + static bool IsInstance(const BaseValue* value); TextValue(); + const std::string& GetValue() const; void SetValue(const std::string& value); }; @@ -58,7 +62,10 @@ private: std::chrono::time_point mValue; public: + static bool IsInstance(const BaseValue* value); DateTimeValue(); + + std::string GetString() const; const std::chrono::time_point& GetValue() const; void SetValue(const std::chrono::time_point& value); }; -- cgit v1.2.3-70-g09d2