X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FDataBoards.h;fp=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FDataBoards.h;h=499906d9a0673301d5a96a5df4b1727c8ef5bcbe;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;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 new file mode 100644 index 000000000..499906d9a --- /dev/null +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DataBoards.h @@ -0,0 +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; + } + } +} \ No newline at end of file