--- /dev/null
+#pragma once\r
+\r
+#include "Value.h"\r
+\r
+#include <string>\r
+#include <map>\r
+\r
+namespace Databoard {\r
+ namespace Value {\r
+\r
+ struct ValueComparison {\r
+ bool operator()(Value* const &a, Value* const &b) const;\r
+ };\r
+\r
+ typedef std::map<Value*, Value*, ValueComparison> MKVMap;\r
+\r
+ class DATABOARD_API MapValue : public Value {\r
+ public:\r
+ MapValue(Databoard::Type::DataType* dataBoard);\r
+ virtual ~MapValue();\r
+\r
+ virtual std::string writeOut(int indent = 0);\r
+ virtual bool equals(const Value* other);\r
+ virtual std::string isValid();\r
+\r
+ bool put(Value* key, Value* value);\r
+ int count();\r
+\r
+ Value* get(Value* key);\r
+ bool containsKey(Value* key);\r
+ Value* remove(Value* key);\r
+ void clear();\r
+\r
+ // startkey inclusive, endkey exclusive\r
+ // https://www.simantics.org/wiki/index.php/Databoard_Specification#Order\r
+ void removeRange(Value* startKey, Value* endKey);\r
+\r
+ Value* getCeiling(Value* key);\r
+ Value* getFlooring(Value* key);\r
+ Value* getHighest();\r
+ Value* getLowest();\r
+ Value* getHigher(Value* key);\r
+ Value* getLower(Value* key);\r
+\r
+ protected:\r
+\r
+ MKVMap values;\r
+\r
+ };\r
+ }\r
+}\r