-#include "FloatType.h"\r
-\r
-#include "Range.h"\r
-#include "Limit.h"\r
-\r
-#include <cfloat>\r
-\r
-namespace Databoard {\r
- namespace Type {\r
-\r
- FloatType::FloatType() : NumberType()\r
- {\r
- this->range = NULL;\r
- }\r
-\r
- FloatType::FloatType(std::string unit) : NumberType(unit)\r
- {\r
- this->unit = unit;\r
- this->range = NULL;\r
- }\r
-\r
- FloatType::FloatType(std::string unit, Range* range) : NumberType(unit, range)\r
- {\r
- this->unit = unit;\r
- this->range = range;\r
- }\r
-\r
- FloatType::~FloatType()\r
- {\r
- }\r
-\r
- float FloatType::minValue()\r
- {\r
- if(range == NULL) return FLT_MIN;\r
-\r
- Limit* l = range->getLower();\r
-\r
- float value = l->getFloat(FLT_MIN);\r
-\r
- return value;\r
- }\r
-\r
- float FloatType::maxValue()\r
- {\r
- if(range == NULL) return FLT_MAX;\r
-\r
- Limit* l = range->getUpper();\r
-\r
- float value = l->getFloat(FLT_MAX);\r
-\r
- return value;\r
- }\r
-\r
- std::string FloatType::writeOut(int indent)\r
- {\r
- std::string s;\r
-\r
- s.append("Float");\r
-\r
- s += NumberType::writeOut(indent + 1);\r
-\r
- return s;\r
- }\r
- }\r
-}\r
+#include "FloatType.h"
+
+#include "Range.h"
+#include "Limit.h"
+
+#include <cfloat>
+
+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;
+ }
+ }
+}