#pragma once #include "DataType.h" #include "DataValue.h" namespace Databoard { namespace Util { Value* parse(std::string textValue, DataType* dataBoard) { return null; } DataType* parse(std::string textValue) { return null; } bool equals(DataType* a, DataType* b) { return false; } bool equals(DataType* type, Value* a, Value* b) { return false; } std::string toString(DataType* type) { return ""; } std::string toString(Value* value) { return ""; } /** * Compares its two data values for order. Returns a negative integer, * zero, or a positive integer as the first argument is less than, equal * to, or greater than the second.

* * The implementor must also ensure that the relation is transitive: * ((compare(x, y)>0) && (compare(y, z)>0)) implies * compare(x, z)>0.

* * Finally, the implementor must ensure that compare(x, y)==0 * implies that sgn(compare(x, z))==sgn(compare(y, z)) for all * z.

* * The comparison function is defined at * https://www.simantics.org/wiki/index.php/Org.simantics.databoard_Manual#CompareTo_and_Equals

* * Note, comparing 2 different number types will not result a value comparison. * Instead values have the following type precedence ByteType, IntegerType, LongType, * FloatType, and the highest DoubleType.

* * @param o1 the first object to be compared. * @param o2 the second object to be compared. * @return a negative integer, zero, or a positive integer as the * first argument is less than, equal to, or greater than the * second. * @throws BindingException if object cannot be handled by a binding */ int compare(Value* a, Value* b) { return 0; } } }