#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; } } }