X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FDoubleType.cpp;h=d2b952ad071ebf135c4f5fa25ecc23e49de6c0d4;hp=dbf2a428a6eb2f14f0c2b31ad470e8a00ceaf683;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DoubleType.cpp b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DoubleType.cpp index dbf2a428a..d2b952ad0 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DoubleType.cpp +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/DoubleType.cpp @@ -1,67 +1,67 @@ -#include "DoubleType.h" - -#include "Range.h" -#include "Limit.h" - -#include -#include - -namespace Databoard { - namespace Type { - - DoubleType::DoubleType() - { - this->range = NULL; - } - - DoubleType::DoubleType(std::string unit) - { - this->unit = unit; - this->range = NULL; - } - - DoubleType::DoubleType(std::string unit, Range* range) - { - this->unit = unit; - this->range = range; - } - - DoubleType::~DoubleType() - { - range = range; - } - - double DoubleType::minValue() - { - if(range == NULL) return DBL_MIN; - - Limit* l = range->getLower(); - - double value = l->getDouble(DBL_MIN); - - return value; - } - - double DoubleType::maxValue() - { - if(range == NULL) return DBL_MAX; - - Limit* l = range->getUpper(); - - double value = l->getDouble(DBL_MAX); - - return value; - } - - std::string DoubleType::writeOut(int indent) - { - std::string s; - - s.append("Double"); - - s += NumberType::writeOut(indent + 1); - - return s; - } - } -} +#include "DoubleType.h" + +#include "Range.h" +#include "Limit.h" + +#include +#include + +namespace Databoard { + namespace Type { + + DoubleType::DoubleType() + { + this->range = NULL; + } + + DoubleType::DoubleType(std::string unit) + { + this->unit = unit; + this->range = NULL; + } + + DoubleType::DoubleType(std::string unit, Range* range) + { + this->unit = unit; + this->range = range; + } + + DoubleType::~DoubleType() + { + range = range; + } + + double DoubleType::minValue() + { + if(range == NULL) return DBL_MIN; + + Limit* l = range->getLower(); + + double value = l->getDouble(DBL_MIN); + + return value; + } + + double DoubleType::maxValue() + { + if(range == NULL) return DBL_MAX; + + Limit* l = range->getUpper(); + + double value = l->getDouble(DBL_MAX); + + return value; + } + + std::string DoubleType::writeOut(int indent) + { + std::string s; + + s.append("Double"); + + s += NumberType::writeOut(indent + 1); + + return s; + } + } +}