From 7fe47a9d5b1727a61dc724523b530762f6d6ba19 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 30 Jun 2022 21:38:53 -0700 Subject: Restructure project --- app/source/Cplt/Model/Workflow/Values/Basic.hpp | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 app/source/Cplt/Model/Workflow/Values/Basic.hpp (limited to 'app/source/Cplt/Model/Workflow/Values/Basic.hpp') diff --git a/app/source/Cplt/Model/Workflow/Values/Basic.hpp b/app/source/Cplt/Model/Workflow/Values/Basic.hpp new file mode 100644 index 0000000..820fb13 --- /dev/null +++ b/app/source/Cplt/Model/Workflow/Values/Basic.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include + +#include +#include +#include + +class NumericValue : public BaseValue +{ +private: + double mValue; + +public: + static bool IsInstance(const BaseValue* value); + NumericValue(); + + NumericValue(const NumericValue&) = delete; + NumericValue& operator=(const NumericValue&) = delete; + NumericValue(NumericValue&&) = default; + NumericValue& operator=(NumericValue&&) = default; + + std::string GetTruncatedString() const; + std::string GetRoundedString() const; + std::string GetString() const; + + int64_t GetInt() const; + double GetValue() const; + void SetValue(double value); +}; + +class TextValue : public BaseValue +{ +private: + std::string mValue; + +public: + static bool IsInstance(const BaseValue* value); + TextValue(); + + TextValue(const TextValue&) = delete; + TextValue& operator=(const TextValue&) = delete; + TextValue(TextValue&&) = default; + TextValue& operator=(TextValue&&) = default; + + const std::string& GetValue() const; + void SetValue(const std::string& value); +}; + +class DateTimeValue : public BaseValue +{ +private: + std::chrono::time_point mValue; + +public: + static bool IsInstance(const BaseValue* value); + DateTimeValue(); + + DateTimeValue(const DateTimeValue&) = delete; + DateTimeValue& operator=(const DateTimeValue&) = delete; + DateTimeValue(DateTimeValue&&) = default; + DateTimeValue& operator=(DateTimeValue&&) = default; + + 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