aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Model/Workflow/Values/Dictionary.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-30 21:38:53 -0700
committerrtk0c <[email protected]>2022-06-30 21:38:53 -0700
commit7fe47a9d5b1727a61dc724523b530762f6d6ba19 (patch)
treee95be6e66db504ed06d00b72c579565bab873277 /app/source/Cplt/Model/Workflow/Values/Dictionary.hpp
parent2cf952088d375ac8b2f45b144462af0953436cff (diff)
Restructure project
Diffstat (limited to 'app/source/Cplt/Model/Workflow/Values/Dictionary.hpp')
-rw-r--r--app/source/Cplt/Model/Workflow/Values/Dictionary.hpp25
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);
+};