]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / DataBoards.h
diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h
new file mode 100644 (file)
index 0000000..499906d
--- /dev/null
@@ -0,0 +1,74 @@
+#pragma once\r
+\r
+#include "DataType.h"\r
+#include "DataValue.h"\r
+\r
+namespace Databoard {\r
+       namespace Util {\r
+\r
+\r
+\r
+               Value* parse(std::string textValue, DataType* dataBoard)\r
+               {\r
+                       return null;\r
+               }\r
+\r
+               DataType* parse(std::string textValue)\r
+               {\r
+                       return null;\r
+               }\r
+\r
+               bool equals(DataType* a, DataType* b)\r
+               {\r
+                       return false;\r
+               }\r
+\r
+               bool equals(DataType* type, Value* a, Value* b)\r
+               {\r
+                       return false;\r
+               }\r
+\r
+               std::string toString(DataType* type)\r
+               {\r
+                       return "";\r
+               }\r
+\r
+               std::string toString(Value* value)\r
+               {\r
+                       return "";\r
+               }\r
+\r
+               /**\r
+               * Compares its two data values for order.  Returns a negative integer,\r
+               * zero, or a positive integer as the first argument is less than, equal\r
+               * to, or greater than the second.<p>\r
+               * \r
+               * The implementor must also ensure that the relation is transitive:\r
+               * <tt>((compare(x, y)&gt;0) &amp;&amp; (compare(y, z)&gt;0))</tt> implies\r
+               * <tt>compare(x, z)&gt;0</tt>.<p>\r
+               *\r
+               * Finally, the implementor must ensure that <tt>compare(x, y)==0</tt>\r
+               * implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all\r
+               * <tt>z</tt>.<p>\r
+               * \r
+               * The comparison function is defined at \r
+               * https://www.simantics.org/wiki/index.php/Org.simantics.databoard_Manual#CompareTo_and_Equals <p>\r
+               * \r
+               * Note, comparing 2 different number types will not result a value comparison.\r
+               * Instead values have the following type precedence ByteType, IntegerType, LongType,\r
+               * FloatType, and the highest DoubleType. <p>\r
+               *\r
+               * @param o1 the first object to be compared.\r
+               * @param o2 the second object to be compared.\r
+               * @return a negative integer, zero, or a positive integer as the\r
+               *              first argument is less than, equal to, or greater than the\r
+               *              second.\r
+               * @throws BindingException if object cannot be handled by a binding\r
+               */\r
+\r
+               int compare(Value* a, Value* b)\r
+               {\r
+                       return 0;\r
+               }\r
+       }\r
+}
\ No newline at end of file