X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FMapValue.h;h=e304c1b199a53adcf87568226c2cd6db283b28ee;hp=c1af2accb74a826a0a99c51ed0a42614dc1d3625;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/MapValue.h b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/MapValue.h index c1af2accb..e304c1b19 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/MapValue.h +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/MapValue.h @@ -1,51 +1,51 @@ -#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; - - }; - } -} +#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; + + }; + } +}