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