X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FDataBoards.h;h=237b5ed3de71f9b509ee5cfb9583dacb673ff102;hb=refs%2Fchanges%2F38%2F238%2F2;hp=499906d9a0673301d5a96a5df4b1727c8ef5bcbe;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h index 499906d9a..237b5ed3d 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h @@ -1,74 +1,74 @@ -#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; - } - } +#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; + } + } } \ No newline at end of file