-#include "ByteType.h"\r
-\r
-#include "Range.h"\r
-#include "Limit.h"\r
-\r
-namespace Databoard {\r
- namespace Type {\r
-\r
- ByteType::ByteType() : NumberType()\r
- {\r
- this->range = NULL;\r
- }\r
-\r
- ByteType::ByteType(std::string unit) : NumberType(unit)\r
- {\r
- this->unit = unit;\r
- this->range = NULL;\r
- }\r
-\r
- ByteType::ByteType(std::string unit, Range* range) : NumberType(unit, range)\r
- {\r
- this->unit = unit;\r
- this->range = range;\r
- }\r
-\r
- ByteType::~ByteType()\r
- {\r
- }\r
-\r
- char ByteType::minValue()\r
- {\r
- if(range == NULL) return SCHAR_MIN;\r
-\r
- Limit* l = range->getLower();\r
-\r
- char value = l->getByte(SCHAR_MIN);\r
-\r
- return value;\r
- }\r
-\r
- char ByteType::maxValue()\r
- {\r
- if(range == NULL) return SCHAR_MAX;\r
-\r
- Limit* l = range->getUpper();\r
-\r
- char value = l->getByte(SCHAR_MAX);\r
-\r
- return value;\r
- }\r
-\r
- std::string ByteType::writeOut(int indent)\r
- {\r
- std::string s;\r
-\r
- s.append("Byte");\r
-\r
- s += NumberType::writeOut(indent + 1);\r
-\r
- return s;\r
- }\r
- }\r
-}\r
+#include "ByteType.h"
+
+#include "Range.h"
+#include "Limit.h"
+
+namespace Databoard {
+ namespace Type {
+
+ ByteType::ByteType() : NumberType()
+ {
+ this->range = NULL;
+ }
+
+ ByteType::ByteType(std::string unit) : NumberType(unit)
+ {
+ this->unit = unit;
+ this->range = NULL;
+ }
+
+ ByteType::ByteType(std::string unit, Range* range) : NumberType(unit, range)
+ {
+ this->unit = unit;
+ this->range = range;
+ }
+
+ ByteType::~ByteType()
+ {
+ }
+
+ char ByteType::minValue()
+ {
+ if(range == NULL) return SCHAR_MIN;
+
+ Limit* l = range->getLower();
+
+ char value = l->getByte(SCHAR_MIN);
+
+ return value;
+ }
+
+ char ByteType::maxValue()
+ {
+ if(range == NULL) return SCHAR_MAX;
+
+ Limit* l = range->getUpper();
+
+ char value = l->getByte(SCHAR_MAX);
+
+ return value;
+ }
+
+ std::string ByteType::writeOut(int indent)
+ {
+ std::string s;
+
+ s.append("Byte");
+
+ s += NumberType::writeOut(indent + 1);
+
+ return s;
+ }
+ }
+}