diff options
Diffstat (limited to 'app/source/Cplt/Model/Workflow/Values/Dictionary.hpp')
-rw-r--r-- | app/source/Cplt/Model/Workflow/Values/Dictionary.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/source/Cplt/Model/Workflow/Values/Dictionary.hpp b/app/source/Cplt/Model/Workflow/Values/Dictionary.hpp new file mode 100644 index 0000000..6eff308 --- /dev/null +++ b/app/source/Cplt/Model/Workflow/Values/Dictionary.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include <Cplt/Model/Workflow/Value.hpp> + +#include <tsl/array_map.h> +#include <memory> +#include <string> +#include <string_view> + +class DictionaryValue : public BaseValue +{ +private: + tsl::array_map<char, std::unique_ptr<BaseValue>> 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<BaseValue>& value); + BaseValue& InsertOrReplace(std::string_view key, std::unique_ptr<BaseValue> value); + void Remove(std::string_view key); +}; |