X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FDataValue.h;fp=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FDataValue.h;h=7ca1af113dd38cd2f8f28061c08d77668b344f0a;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataValue.h b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataValue.h new file mode 100644 index 000000000..7ca1af113 --- /dev/null +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataValue.h @@ -0,0 +1,62 @@ +#pragma once + +namespace Databoard { + namespace Value { + + + class Value { + public: + Value(); + virtual ~Value() = 0; // meniks tää näin.. + }; + + + class Integer : public Value { + public: + Integer(); + Integer(int value); + + virtual ~Integer(); + + int getValue(); + void setValue(int value); + + protected: + + int value; + }; + + + + class Array : public Value { + public: + virtual int size() = 0; + virtual Value get(int index) = 0; + }; + + + + class GenericArray : public Array { + public: + Value get(int index) { return values.get(index); } + private: + std::vector values; + }; + + + class ByteArray : public Array { + public: + Value get(int index) { return null; } + char* getPrimitiveArray() { return null; } + private: + std::vector values; + }; + + class Double : public Value { + public: + double getValue() { return value; } + private: + double value; + } + } +} \ No newline at end of file