3 #include "DataType.h"
\r
4 #include "DataValue.h"
\r
6 namespace Databoard {
\r
11 Value* parse(std::string textValue, DataType* dataBoard)
\r
16 DataType* parse(std::string textValue)
\r
21 bool equals(DataType* a, DataType* b)
\r
26 bool equals(DataType* type, Value* a, Value* b)
\r
31 std::string toString(DataType* type)
\r
36 std::string toString(Value* value)
\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
46 * The implementor must also ensure that the relation is transitive:
\r
47 * <tt>((compare(x, y)>0) && (compare(y, z)>0))</tt> implies
\r
48 * <tt>compare(x, z)>0</tt>.<p>
\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
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
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
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
66 * @throws BindingException if object cannot be handled by a binding
\r
69 int compare(Value* a, Value* b)
\r