source: trunk/src/objects/RpVariable.cc @ 1261

Last change on this file since 1261 was 1018, checked in by gah, 16 years ago

Massive changes: New directory/file layout

File size: 4.4 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  RpVariable.cc
4 *
5 *   Rappture 2.0 Variable member functions
6 *
7 * ======================================================================
8 *  AUTHOR:  Derrick Kearney, Purdue University
9 *  Copyright (c) 2004-2005  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15
16 #include "RpVariable.h"
17
18/**********************************************************************/
19// METHOD: setPath()
20/// Set the path of this object
21/**
22 */
23
24RpVariable&
25RpVariable::setPath(std::string newPath)
26{
27    path = newPath;
28    return *this;
29}
30
31/**********************************************************************/
32// METHOD: setDefaultValue()
33/// Set the default value of this object
34/**
35 */
36
37RpVariable&
38RpVariable::setDefaultValue(void* newDefaultVal)
39{
40    // who is responsible for freeing the pointer?
41    defaultVal = newDefaultVal;
42    return *this;
43}
44
45/**********************************************************************/
46// METHOD: setCurrentValue()
47/// Set the current value of this object
48/**
49 */
50
51RpVariable&
52RpVariable::setCurrentValue(void* newCurrentVal)
53{
54    // who is responsible for freeing the pointer?
55    currentVal = newCurrentVal;
56    return *this;
57}
58
59/**********************************************************************/
60// METHOD: setLabel()
61/// Set the label of this object
62/**
63 */
64
65RpVariable&
66RpVariable::setLabel(std::string newLabel)
67{
68    about.setLabel(newLabel);
69    return *this;
70}
71
72/**********************************************************************/
73// METHOD: setDesc()
74/// Set the desc of this object
75/**
76 */
77
78RpVariable&
79RpVariable::setDesc(std::string newDesc)
80{
81    about.setDesc(newDesc);
82    return *this;
83}
84
85/**********************************************************************/
86// METHOD: setHints()
87/// Set the hints of this object
88/**
89 */
90
91RpVariable&
92RpVariable::setHints(std::string newHints)
93{
94    about.setHints(newHints);
95    return *this;
96}
97
98/**********************************************************************/
99// METHOD: setColor()
100/// Set the color of this object
101/**
102 */
103
104RpVariable&
105RpVariable::setColor(std::string newColor)
106{
107    about.setColor(newColor);
108    return *this;
109}
110
111/**********************************************************************/
112// METHOD: setIcon()
113/// Set the icon of this object
114/**
115 */
116
117RpVariable&
118RpVariable::setIcon(std::string newIcon)
119{
120    about.setIcon(newIcon);
121    return *this;
122}
123
124
125/**********************************************************************/
126// METHOD: getPath()
127/// Report the path of this object
128/**
129 */
130
131std::string
132RpVariable::getPath() const
133{
134    return path;
135}
136
137/**********************************************************************/
138// METHOD: getDefaultValue()
139/// Report the default value of the object
140/**
141 */
142
143void*
144RpVariable::getDefaultValue() const
145{
146    return defaultVal;
147}
148
149/**********************************************************************/
150// METHOD: getCurrentValue()
151/// Report the current value of the object
152/**
153 */
154
155void*
156RpVariable::getCurrentValue() const
157{
158    return currentVal;
159}
160
161/**********************************************************************/
162// METHOD: getLabel()
163/// Report the label of the object
164/**
165 */
166
167std::string
168RpVariable::getLabel() const
169{
170    return about.getLabel();
171}
172
173/**********************************************************************/
174// METHOD: getDesc()
175/// Report the desc of the object
176/**
177 */
178
179std::string
180RpVariable::getDesc() const
181{
182    return about.getDesc();
183}
184
185/**********************************************************************/
186// METHOD: getHints()
187/// Report the hints of this object
188/**
189 */
190
191std::string
192RpVariable::getHints() const
193{
194    return about.getHints();
195}
196
197/**********************************************************************/
198// METHOD: getColor()
199/// Report the color of this object
200/**
201 */
202
203std::string
204RpVariable::getColor() const
205{
206    return about.getColor();
207}
208
209/**********************************************************************/
210// METHOD: getIcon()
211/// Report the icon of this object
212/**
213 */
214
215std::string
216RpVariable::getIcon() const
217{
218    return about.getIcon();
219}
220
221
222// -------------------------------------------------------------------- //
223
Note: See TracBrowser for help on using the repository browser.