1 | #include "RpBoolean.h" |
---|
2 | |
---|
3 | int test_setPath(RpBoolean* myBoolean); |
---|
4 | int test_setDefaultValue(RpBoolean* myBoolean); |
---|
5 | int test_setCurrentValue(RpBoolean* myBoolean); |
---|
6 | int test_setLabel(RpBoolean* myBoolean); |
---|
7 | int test_setDesc(RpBoolean* myBoolean); |
---|
8 | |
---|
9 | int test_setPath(RpBoolean* myBoolean) |
---|
10 | { |
---|
11 | std::cout << "Path " << myBoolean->getPath() << std::endl; |
---|
12 | myBoolean->setPath("input.(ambiant)"); |
---|
13 | std::cout << "Path " << myBoolean->getPath() << std::endl; |
---|
14 | |
---|
15 | return 1; |
---|
16 | } |
---|
17 | |
---|
18 | |
---|
19 | int test_setDefaultValue(RpBoolean* myBoolean) |
---|
20 | { |
---|
21 | std::cout << "defaultVal " << myBoolean->getDefaultValue() << std::endl; |
---|
22 | myBoolean->setDefaultValue("new default value"); |
---|
23 | std::cout << "defaultVal " << myBoolean->getDefaultValue() << std::endl; |
---|
24 | |
---|
25 | return 1; |
---|
26 | } |
---|
27 | |
---|
28 | int test_setCurrentValue(RpBoolean* myBoolean) |
---|
29 | { |
---|
30 | std::cout << "currentVal " << myBoolean->getCurrentValue() << std::endl; |
---|
31 | myBoolean->setCurrentValue("new current value"); |
---|
32 | std::cout << "currentVal " << myBoolean->getCurrentValue() << std::endl; |
---|
33 | |
---|
34 | return 1; |
---|
35 | } |
---|
36 | |
---|
37 | int test_setLabel(RpBoolean* myBoolean) |
---|
38 | { |
---|
39 | std::cout << "label " << myBoolean->getLabel() << std::endl; |
---|
40 | myBoolean->setLabel("newLabel"); |
---|
41 | std::cout << "label " << myBoolean->getLabel() << std::endl; |
---|
42 | |
---|
43 | return 1; |
---|
44 | } |
---|
45 | |
---|
46 | int test_setDesc(RpBoolean* myBoolean) |
---|
47 | { |
---|
48 | std::cout << "desc " << myBoolean->getDesc() << std::endl; |
---|
49 | myBoolean->setDesc("new description"); |
---|
50 | std::cout << "desc " << myBoolean->getDesc() << std::endl; |
---|
51 | |
---|
52 | return 1; |
---|
53 | } |
---|
54 | |
---|
55 | int main () |
---|
56 | { |
---|
57 | |
---|
58 | RpBoolean* T1 = new RpBoolean("input.(ambient).(temperature)","default-string"); |
---|
59 | RpBoolean* T2 = new RpBoolean("input.(ambient).(temperature)", |
---|
60 | "default-string", |
---|
61 | "boolean2's label", |
---|
62 | "boolean2's desc" |
---|
63 | ); |
---|
64 | |
---|
65 | |
---|
66 | std::cout << "T1 run" << std::endl; |
---|
67 | test_setPath(T1); |
---|
68 | test_setDefaultValue(T1); |
---|
69 | test_setCurrentValue(T1); |
---|
70 | test_setLabel(T1); |
---|
71 | test_setDesc(T1); |
---|
72 | |
---|
73 | std::cout << std::endl; |
---|
74 | |
---|
75 | std::cout << "T2 run" << std::endl; |
---|
76 | test_setPath(T2); |
---|
77 | test_setDefaultValue(T2); |
---|
78 | test_setCurrentValue(T2); |
---|
79 | test_setLabel(T2); |
---|
80 | test_setDesc(T2); |
---|
81 | |
---|
82 | std::cout << std::endl; |
---|
83 | std::cout << std::endl; |
---|
84 | |
---|
85 | return 0; |
---|
86 | } |
---|