From beb1f3969e13af72bd9098d484b693e397cf7235 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 3 Jun 2021 12:17:46 -0700 Subject: Dictionary value (string key) --- core/src/Model/Workflow/Values/Dictionary.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 core/src/Model/Workflow/Values/Dictionary.hpp (limited to 'core/src/Model/Workflow/Values/Dictionary.hpp') diff --git a/core/src/Model/Workflow/Values/Dictionary.hpp b/core/src/Model/Workflow/Values/Dictionary.hpp new file mode 100644 index 0000000..65ea82f --- /dev/null +++ b/core/src/Model/Workflow/Values/Dictionary.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "Model/Workflow/Value.hpp" + +#include +#include +#include +#include + +class DictionaryValue : public BaseValue +{ +private: + tsl::array_map> mElements; + +public: + static bool IsInstance(const BaseValue* value); + DictionaryValue(); + + int GetCount() const; + BaseValue* Find(std::string_view key); + + BaseValue* Insert(std::string_view key, std::unique_ptr& value); + BaseValue& InsertOrReplace(std::string_view key, std::unique_ptr value); + void Remove(std::string_view key); +}; -- cgit v1.2.3-70-g09d2