source: trunk/src/core/RpVariable.cc @ 37

Last change on this file since 37 was 37, checked in by dkearney, 19 years ago

adding initial rappture core data structures different types of variables

File size: 6.8 KB
Line 
1
2 #ifndef _RpVARIABLE_H
3     #include "RpVariable.h"
4 #endif
5
6/************************************************************************
7 *                                                                     
8 * set the path of this object
9 *                                                                     
10 ************************************************************************/
11
12RpVariable&
13RpVariable::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
25RpVariable&
26RpVariable::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
39RpVariable&
40RpVariable::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
53RpVariable&
54RpVariable::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
66RpVariable&
67RpVariable::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
79RpVariable&
80RpVariable::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
92RpVariable&
93RpVariable::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
105RpVariable&
106RpVariable::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 ************************************************************************/
118std::string
119RpVariable::getPath() const
120{
121    return path;
122}
123
124/************************************************************************
125 *                                                                     
126 * report the default value of the object
127 *                                                                     
128 ************************************************************************/
129void*
130RpVariable::getDefaultValue() const
131{
132    return defaultVal;
133}
134
135/************************************************************************
136 *                                                                     
137 * report the current value of the object
138 *                                                                     
139 ************************************************************************/
140void*
141RpVariable::getCurrentValue() const
142{
143    return currentVal;
144}
145
146/************************************************************************
147 *                                                                     
148 * report the label of the object
149 *                                                                     
150 ************************************************************************/
151std::string
152RpVariable::getLabel() const
153{
154    return about.getLabel();
155}
156
157/************************************************************************
158 *                                                                     
159 * report the desc of the object
160 *                                                                     
161 ************************************************************************/
162std::string
163RpVariable::getDesc() const
164{
165    return about.getDesc();
166}
167
168/************************************************************************
169 *                                                                     
170 * report the hints of this object
171 *                                                                     
172 ************************************************************************/
173std::string
174RpVariable::getHints() const
175{
176    return about.getHints();
177}
178
179/************************************************************************
180 *                                                                     
181 * report the color of this object
182 *                                                                     
183 ************************************************************************/
184std::string
185RpVariable::getColor() const
186{
187    return about.getColor();
188}
189
190/************************************************************************
191 *                                                                     
192 * report the icon of this object
193 *                                                                     
194 ************************************************************************/
195std::string
196RpVariable::getIcon() const
197{
198    return about.getIcon();
199}
200
201
202// -------------------------------------------------------------------- //
203
Note: See TracBrowser for help on using the repository browser.