X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FFloatType.cpp;h=a83cd6c834134cc6e8d9b122dc1299dd1356025e;hp=88f8d4d50cdf5f81ddb470059e093e5e9a368107;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/FloatType.cpp b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/FloatType.cpp index 88f8d4d50..a83cd6c83 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/FloatType.cpp +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/FloatType.cpp @@ -1,65 +1,65 @@ -#include "FloatType.h" - -#include "Range.h" -#include "Limit.h" - -#include - -namespace Databoard { - namespace Type { - - FloatType::FloatType() : NumberType() - { - this->range = NULL; - } - - FloatType::FloatType(std::string unit) : NumberType(unit) - { - this->unit = unit; - this->range = NULL; - } - - FloatType::FloatType(std::string unit, Range* range) : NumberType(unit, range) - { - this->unit = unit; - this->range = range; - } - - FloatType::~FloatType() - { - } - - float FloatType::minValue() - { - if(range == NULL) return FLT_MIN; - - Limit* l = range->getLower(); - - float value = l->getFloat(FLT_MIN); - - return value; - } - - float FloatType::maxValue() - { - if(range == NULL) return FLT_MAX; - - Limit* l = range->getUpper(); - - float value = l->getFloat(FLT_MAX); - - return value; - } - - std::string FloatType::writeOut(int indent) - { - std::string s; - - s.append("Float"); - - s += NumberType::writeOut(indent + 1); - - return s; - } - } -} +#include "FloatType.h" + +#include "Range.h" +#include "Limit.h" + +#include + +namespace Databoard { + namespace Type { + + FloatType::FloatType() : NumberType() + { + this->range = NULL; + } + + FloatType::FloatType(std::string unit) : NumberType(unit) + { + this->unit = unit; + this->range = NULL; + } + + FloatType::FloatType(std::string unit, Range* range) : NumberType(unit, range) + { + this->unit = unit; + this->range = range; + } + + FloatType::~FloatType() + { + } + + float FloatType::minValue() + { + if(range == NULL) return FLT_MIN; + + Limit* l = range->getLower(); + + float value = l->getFloat(FLT_MIN); + + return value; + } + + float FloatType::maxValue() + { + if(range == NULL) return FLT_MAX; + + Limit* l = range->getUpper(); + + float value = l->getFloat(FLT_MAX); + + return value; + } + + std::string FloatType::writeOut(int indent) + { + std::string s; + + s.append("Float"); + + s += NumberType::writeOut(indent + 1); + + return s; + } + } +}