X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fcpp%2FDataBoardTest%2FDataBoard%2FIntegerType.cpp;h=fecc3ef8415d1ca365870f7838613ad4f5922319;hb=5224651b5c9a5160bffc4d063847a8f96b54efda;hp=0412afabc690380fe3fcf387b65a7f5cb41babaf;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/IntegerType.cpp b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/IntegerType.cpp index 0412afabc..fecc3ef84 100644 --- a/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/IntegerType.cpp +++ b/bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/IntegerType.cpp @@ -1,64 +1,64 @@ -#include "IntegerType.h" - -#include "Range.h" -#include "Limit.h" - -namespace Databoard { - namespace Type { - - IntegerType::IntegerType() : NumberType() - { - this->unit = unit; - this->range = NULL; - } - - IntegerType::IntegerType(std::string unit) : NumberType(unit) - { - this->unit = unit; - this->range = NULL; - } - - IntegerType::IntegerType(std::string unit, Range* range) : NumberType(unit, range) - { - this->unit = unit; - this->range = range; - } - - IntegerType::~IntegerType() - { - } - - int IntegerType::minValue() - { - if(range == NULL) return INT_MIN; - - Limit* l = range->getLower(); - - int value = l->getInteger(INT_MIN); - - return value; - } - - int IntegerType::maxValue() - { - if(range == NULL) return INT_MAX; - - Limit* l = range->getUpper(); - - int value = l->getInteger(INT_MAX); - - return value; - } - - std::string IntegerType::writeOut(int indent) - { - std::string s; - - s.append("Integer"); - - s += NumberType::writeOut(indent + 1); - - return s; - } - } -} +#include "IntegerType.h" + +#include "Range.h" +#include "Limit.h" + +namespace Databoard { + namespace Type { + + IntegerType::IntegerType() : NumberType() + { + this->unit = unit; + this->range = NULL; + } + + IntegerType::IntegerType(std::string unit) : NumberType(unit) + { + this->unit = unit; + this->range = NULL; + } + + IntegerType::IntegerType(std::string unit, Range* range) : NumberType(unit, range) + { + this->unit = unit; + this->range = range; + } + + IntegerType::~IntegerType() + { + } + + int IntegerType::minValue() + { + if(range == NULL) return INT_MIN; + + Limit* l = range->getLower(); + + int value = l->getInteger(INT_MIN); + + return value; + } + + int IntegerType::maxValue() + { + if(range == NULL) return INT_MAX; + + Limit* l = range->getUpper(); + + int value = l->getInteger(INT_MAX); + + return value; + } + + std::string IntegerType::writeOut(int indent) + { + std::string s; + + s.append("Integer"); + + s += NumberType::writeOut(indent + 1); + + return s; + } + } +}