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