1 | |
---|
2 | #ifndef _RpVARIABLE_H |
---|
3 | #include "RpVariable.h" |
---|
4 | #endif |
---|
5 | |
---|
6 | /************************************************************************ |
---|
7 | * |
---|
8 | * set the path of this object |
---|
9 | * |
---|
10 | ************************************************************************/ |
---|
11 | |
---|
12 | RpVariable& |
---|
13 | RpVariable::setPath(std::string newPath) |
---|
14 | { |
---|
15 | path = newPath; |
---|
16 | return *this; |
---|
17 | } |
---|
18 | |
---|
19 | /************************************************************************ |
---|
20 | * |
---|
21 | * set the default value of this object |
---|
22 | * |
---|
23 | ************************************************************************/ |
---|
24 | |
---|
25 | RpVariable& |
---|
26 | RpVariable::setDefaultValue(void* newDefaultVal) |
---|
27 | { |
---|
28 | // who is responsible for freeing the pointer? |
---|
29 | defaultVal = newDefaultVal; |
---|
30 | return *this; |
---|
31 | } |
---|
32 | |
---|
33 | /************************************************************************ |
---|
34 | * |
---|
35 | * set the current value of this object |
---|
36 | * |
---|
37 | ************************************************************************/ |
---|
38 | |
---|
39 | RpVariable& |
---|
40 | RpVariable::setCurrentValue(void* newCurrentVal) |
---|
41 | { |
---|
42 | // who is responsible for freeing the pointer? |
---|
43 | currentVal = newCurrentVal; |
---|
44 | return *this; |
---|
45 | } |
---|
46 | |
---|
47 | /************************************************************************ |
---|
48 | * |
---|
49 | * set the label of this object |
---|
50 | * |
---|
51 | ************************************************************************/ |
---|
52 | |
---|
53 | RpVariable& |
---|
54 | RpVariable::setLabel(std::string newLabel) |
---|
55 | { |
---|
56 | about.setLabel(newLabel); |
---|
57 | return *this; |
---|
58 | } |
---|
59 | |
---|
60 | /************************************************************************ |
---|
61 | * |
---|
62 | * set the desc of this object |
---|
63 | * |
---|
64 | ************************************************************************/ |
---|
65 | |
---|
66 | RpVariable& |
---|
67 | RpVariable::setDesc(std::string newDesc) |
---|
68 | { |
---|
69 | about.setDesc(newDesc); |
---|
70 | return *this; |
---|
71 | } |
---|
72 | |
---|
73 | /************************************************************************ |
---|
74 | * |
---|
75 | * set the hints of this object |
---|
76 | * |
---|
77 | ************************************************************************/ |
---|
78 | |
---|
79 | RpVariable& |
---|
80 | RpVariable::setHints(std::string newHints) |
---|
81 | { |
---|
82 | about.setHints(newHints); |
---|
83 | return *this; |
---|
84 | } |
---|
85 | |
---|
86 | /************************************************************************ |
---|
87 | * |
---|
88 | * set the color of this object |
---|
89 | * |
---|
90 | ************************************************************************/ |
---|
91 | |
---|
92 | RpVariable& |
---|
93 | RpVariable::setColor(std::string newColor) |
---|
94 | { |
---|
95 | about.setColor(newColor); |
---|
96 | return *this; |
---|
97 | } |
---|
98 | |
---|
99 | /************************************************************************ |
---|
100 | * |
---|
101 | * set the icon of this object |
---|
102 | * |
---|
103 | ************************************************************************/ |
---|
104 | |
---|
105 | RpVariable& |
---|
106 | RpVariable::setIcon(std::string newIcon) |
---|
107 | { |
---|
108 | about.setIcon(newIcon); |
---|
109 | return *this; |
---|
110 | } |
---|
111 | |
---|
112 | |
---|
113 | /************************************************************************ |
---|
114 | * |
---|
115 | * report the path of the object |
---|
116 | * |
---|
117 | ************************************************************************/ |
---|
118 | std::string |
---|
119 | RpVariable::getPath() const |
---|
120 | { |
---|
121 | return path; |
---|
122 | } |
---|
123 | |
---|
124 | /************************************************************************ |
---|
125 | * |
---|
126 | * report the default value of the object |
---|
127 | * |
---|
128 | ************************************************************************/ |
---|
129 | void* |
---|
130 | RpVariable::getDefaultValue() const |
---|
131 | { |
---|
132 | return defaultVal; |
---|
133 | } |
---|
134 | |
---|
135 | /************************************************************************ |
---|
136 | * |
---|
137 | * report the current value of the object |
---|
138 | * |
---|
139 | ************************************************************************/ |
---|
140 | void* |
---|
141 | RpVariable::getCurrentValue() const |
---|
142 | { |
---|
143 | return currentVal; |
---|
144 | } |
---|
145 | |
---|
146 | /************************************************************************ |
---|
147 | * |
---|
148 | * report the label of the object |
---|
149 | * |
---|
150 | ************************************************************************/ |
---|
151 | std::string |
---|
152 | RpVariable::getLabel() const |
---|
153 | { |
---|
154 | return about.getLabel(); |
---|
155 | } |
---|
156 | |
---|
157 | /************************************************************************ |
---|
158 | * |
---|
159 | * report the desc of the object |
---|
160 | * |
---|
161 | ************************************************************************/ |
---|
162 | std::string |
---|
163 | RpVariable::getDesc() const |
---|
164 | { |
---|
165 | return about.getDesc(); |
---|
166 | } |
---|
167 | |
---|
168 | /************************************************************************ |
---|
169 | * |
---|
170 | * report the hints of this object |
---|
171 | * |
---|
172 | ************************************************************************/ |
---|
173 | std::string |
---|
174 | RpVariable::getHints() const |
---|
175 | { |
---|
176 | return about.getHints(); |
---|
177 | } |
---|
178 | |
---|
179 | /************************************************************************ |
---|
180 | * |
---|
181 | * report the color of this object |
---|
182 | * |
---|
183 | ************************************************************************/ |
---|
184 | std::string |
---|
185 | RpVariable::getColor() const |
---|
186 | { |
---|
187 | return about.getColor(); |
---|
188 | } |
---|
189 | |
---|
190 | /************************************************************************ |
---|
191 | * |
---|
192 | * report the icon of this object |
---|
193 | * |
---|
194 | ************************************************************************/ |
---|
195 | std::string |
---|
196 | RpVariable::getIcon() const |
---|
197 | { |
---|
198 | return about.getIcon(); |
---|
199 | } |
---|
200 | |
---|
201 | |
---|
202 | // -------------------------------------------------------------------- // |
---|
203 | |
---|