summaryrefslogtreecommitdiff
path: root/core/src/Model/EvaluatedValue.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-04-16 16:49:28 -0700
committerrtk0c <[email protected]>2021-04-16 16:49:28 -0700
commit4e5730e1fcef150ce2f13f52a278890589ca96ad (patch)
tree0fe4002349047c7c770754e273d6a1d1ed666cbb /core/src/Model/EvaluatedValue.hpp
parent80d8ae5a6fef6c9a34e81e240539cb655dd99851 (diff)
More work on workflows
- WorkflowStep -> WorkflowNode - Added initial kinds of WorkflowNode's
Diffstat (limited to 'core/src/Model/EvaluatedValue.hpp')
-rw-r--r--core/src/Model/EvaluatedValue.hpp25
1 files changed, 16 insertions, 9 deletions
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<std::chrono::system_clock> mValue;
public:
+ static bool IsInstance(const BaseValue* value);
DateTimeValue();
+
+ std::string GetString() const;
const std::chrono::time_point<std::chrono::system_clock>& GetValue() const;
void SetValue(const std::chrono::time_point<std::chrono::system_clock>& value);
};