]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/Range.cpp
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / Range.cpp
1 #include "Range.h"
2
3 #include "Limit.h"
4
5 #include "Constants.h"
6
7 namespace Databoard {
8
9         Range::Range()
10         {
11                 lower = new Limit(true);
12                 upper = new Limit(false);
13         }
14
15         Range::~Range()
16         {
17                 if(lower != NULL)
18                 {
19                         delete lower;
20                         lower = NULL;
21                 }
22
23                 if(upper != NULL)
24                 {
25                         delete upper;
26                         upper = NULL;
27                 }
28         }
29
30         Limit* Range::getLower()
31         {
32                 return lower;
33         }
34
35         Limit* Range::getUpper()
36         {
37                 return upper;
38         }
39
40         void Range::setLower(std::string value)
41         {
42                 lower->setValue(value);
43         }
44
45         void Range::setUpper(std::string value)
46         {
47                 upper->setValue(value);
48         }
49
50         std::string Range::writeOut()
51         {
52                 std::string s;
53
54                 s += lower->writeOut();
55
56                 s += " ";
57                 s += STR_RANGESPLIT;
58                 s += " ";
59
60                 s += upper->writeOut();
61
62                 return s;
63         }
64 }