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