1 | /* |
---|
2 | * ====================================================================== |
---|
3 | * Copyright (c) 2004-2012 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | * See the file "license.terms" for information on usage and |
---|
6 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
7 | * ====================================================================== |
---|
8 | */ |
---|
9 | #include "RpVariable.h" |
---|
10 | |
---|
11 | int test_getPath(RpVariable* myVariable); |
---|
12 | int test_getDefaultValue(RpVariable* myVariable); |
---|
13 | int test_getCurrentValue(RpVariable* myVariable); |
---|
14 | int test_getLabel(RpVariable* myVariable); |
---|
15 | int test_getDesc(RpVariable* myVariable); |
---|
16 | |
---|
17 | int test_getPath(RpVariable* myVariable) |
---|
18 | { |
---|
19 | std::cout << "Path " << myVariable->getPath() << std::endl; |
---|
20 | |
---|
21 | return 1; |
---|
22 | } |
---|
23 | |
---|
24 | int test_getDefaultValue(RpVariable* myVariable) |
---|
25 | { |
---|
26 | std::cout << "defaultVal " << *((double*) myVariable->getDefaultValue()) << std::endl; |
---|
27 | |
---|
28 | return 1; |
---|
29 | } |
---|
30 | |
---|
31 | int test_getCurrentValue(RpVariable* myVariable) |
---|
32 | { |
---|
33 | std::cout << "currentVal " << myVariable->getCurrentValue() << std::endl; |
---|
34 | |
---|
35 | return 1; |
---|
36 | } |
---|
37 | |
---|
38 | int test_getLabel(RpVariable* myVariable) |
---|
39 | { |
---|
40 | std::cout << "label " << myVariable->getLabel() << std::endl; |
---|
41 | |
---|
42 | return 1; |
---|
43 | } |
---|
44 | |
---|
45 | int test_getDesc(RpVariable* myVariable) |
---|
46 | { |
---|
47 | std::cout << "desc " << myVariable->getDesc() << std::endl; |
---|
48 | |
---|
49 | return 1; |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | int main () |
---|
55 | { |
---|
56 | |
---|
57 | RpVariable* T1 = new RpVariable("input.(ambient).(temperature)",new double(300.00)); |
---|
58 | /* |
---|
59 | RpVariable* T2 = new RpVariable("input.(ambient).(temperature)", |
---|
60 | "K", |
---|
61 | 300.00, |
---|
62 | 0.00, |
---|
63 | 1000.00, |
---|
64 | "Temperature", |
---|
65 | "Ambient Temperature, value between 0 and 1000" |
---|
66 | ); |
---|
67 | */ |
---|
68 | |
---|
69 | test_getPath(T1); |
---|
70 | test_getDefaultValue(T1); |
---|
71 | // test_getCurrentValue(T1); |
---|
72 | test_getLabel(T1); |
---|
73 | test_getDesc(T1); |
---|
74 | |
---|
75 | std::cout << std::endl; |
---|
76 | |
---|
77 | /* |
---|
78 | test_getPath(T2); |
---|
79 | test_getUnits(T2); |
---|
80 | test_getDefaultValue(T2); |
---|
81 | test_getCurrentValue(T2); |
---|
82 | test_getMin(T2); |
---|
83 | test_getMax(T2); |
---|
84 | test_getLabel(T2); |
---|
85 | test_getDesc(T2); |
---|
86 | */ |
---|
87 | |
---|
88 | std::cout << std::endl; |
---|
89 | |
---|
90 | return 0; |
---|
91 | } |
---|