]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 #pragma once\r
2 \r
3 #include "DataType.h"\r
4 #include "DataValue.h"\r
5 \r
6 namespace Databoard {\r
7         namespace Util {\r
8 \r
9 \r
10 \r
11                 Value* parse(std::string textValue, DataType* dataBoard)\r
12                 {\r
13                         return null;\r
14                 }\r
15 \r
16                 DataType* parse(std::string textValue)\r
17                 {\r
18                         return null;\r
19                 }\r
20 \r
21                 bool equals(DataType* a, DataType* b)\r
22                 {\r
23                         return false;\r
24                 }\r
25 \r
26                 bool equals(DataType* type, Value* a, Value* b)\r
27                 {\r
28                         return false;\r
29                 }\r
30 \r
31                 std::string toString(DataType* type)\r
32                 {\r
33                         return "";\r
34                 }\r
35 \r
36                 std::string toString(Value* value)\r
37                 {\r
38                         return "";\r
39                 }\r
40 \r
41                 /**\r
42                 * Compares its two data values for order.  Returns a negative integer,\r
43                 * zero, or a positive integer as the first argument is less than, equal\r
44                 * to, or greater than the second.<p>\r
45                 * \r
46                 * The implementor must also ensure that the relation is transitive:\r
47                 * <tt>((compare(x, y)&gt;0) &amp;&amp; (compare(y, z)&gt;0))</tt> implies\r
48                 * <tt>compare(x, z)&gt;0</tt>.<p>\r
49                 *\r
50                 * Finally, the implementor must ensure that <tt>compare(x, y)==0</tt>\r
51                 * implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all\r
52                 * <tt>z</tt>.<p>\r
53                 * \r
54                 * The comparison function is defined at \r
55                 * https://www.simantics.org/wiki/index.php/Org.simantics.databoard_Manual#CompareTo_and_Equals <p>\r
56                 * \r
57                 * Note, comparing 2 different number types will not result a value comparison.\r
58                 * Instead values have the following type precedence ByteType, IntegerType, LongType,\r
59                 * FloatType, and the highest DoubleType. <p>\r
60                 *\r
61                 * @param o1 the first object to be compared.\r
62                 * @param o2 the second object to be compared.\r
63                 * @return a negative integer, zero, or a positive integer as the\r
64                 *              first argument is less than, equal to, or greater than the\r
65                 *              second.\r
66                 * @throws BindingException if object cannot be handled by a binding\r
67                 */\r
68 \r
69                 int compare(Value* a, Value* b)\r
70                 {\r
71                         return 0;\r
72                 }\r
73         }\r
74 }