]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ArrayValue.h
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / ArrayValue.h
diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ArrayValue.h b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/ArrayValue.h
new file mode 100644 (file)
index 0000000..390096f
--- /dev/null
@@ -0,0 +1,37 @@
+#pragma once\r
+\r
+#include "Value.h"\r
+\r
+#include <string>\r
+#include <vector>\r
+\r
+namespace Databoard {\r
+       namespace Value {\r
+\r
+               class DATABOARD_API ArrayValue : public Value {\r
+               public:\r
+                       ArrayValue(Databoard::Type::DataType* dataBoard);\r
+                       virtual ~ArrayValue();\r
+\r
+                       virtual std::string writeOut(int indent = 0);\r
+                       virtual bool equals(const Value* other);\r
+\r
+                       void add(Value* value);\r
+                       void insert(Value* value, int index);\r
+                       int count();\r
+                       void remove(int index, int count);\r
+                       void clear();\r
+                       Value* get(int index);\r
+\r
+                       // snapshot of the array\r
+                       std::vector<Value*> getAll();\r
+\r
+                       virtual std::string isValid();\r
+\r
+               protected:\r
+\r
+                       std::vector<Value*> values;\r
+\r
+               };\r
+       }\r
+}\r