X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FLongType.cpp;h=a94163cf51f8db4ab1cce4a2d96dd01c93f684c2;hb=refs%2Fchanges%2F38%2F238%2F2;hp=a885e5ba4c67d67164b43e4c59d36dcd10e83bb3;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/LongType.cpp b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/LongType.cpp index a885e5ba4..a94163cf5 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/LongType.cpp +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/LongType.cpp @@ -1,63 +1,63 @@ -#include "LongType.h" - -#include "Range.h" -#include "Limit.h" - -namespace Databoard { - namespace Type { - - LongType::LongType() : NumberType() - { - this->range = NULL; - } - - LongType::LongType(std::string unit) : NumberType(unit) - { - this->unit = unit; - this->range = NULL; - } - - LongType::LongType(std::string unit, Range* range) : NumberType(unit, range) - { - this->unit = unit; - this->range = range; - } - - LongType::~LongType() - { - } - - long LongType::minValue() - { - if(range == NULL) return LONG_MIN; - - Limit* l = range->getLower(); - - long value = l->getLong(LONG_MIN); - - return value; - } - - long LongType::maxValue() - { - if(range == NULL) return LONG_MIN; - - Limit* l = range->getUpper(); - - long value = l->getLong(LONG_MIN); - - return value; - } - - std::string LongType::writeOut(int indent) - { - std::string s; - - s.append("Long"); - - s += NumberType::writeOut(indent + 1); - - return s; - } - } -} +#include "LongType.h" + +#include "Range.h" +#include "Limit.h" + +namespace Databoard { + namespace Type { + + LongType::LongType() : NumberType() + { + this->range = NULL; + } + + LongType::LongType(std::string unit) : NumberType(unit) + { + this->unit = unit; + this->range = NULL; + } + + LongType::LongType(std::string unit, Range* range) : NumberType(unit, range) + { + this->unit = unit; + this->range = range; + } + + LongType::~LongType() + { + } + + long LongType::minValue() + { + if(range == NULL) return LONG_MIN; + + Limit* l = range->getLower(); + + long value = l->getLong(LONG_MIN); + + return value; + } + + long LongType::maxValue() + { + if(range == NULL) return LONG_MIN; + + Limit* l = range->getUpper(); + + long value = l->getLong(LONG_MIN); + + return value; + } + + std::string LongType::writeOut(int indent) + { + std::string s; + + s.append("Long"); + + s += NumberType::writeOut(indent + 1); + + return s; + } + } +}