1 | Curve |
---|
2 | |
---|
3 | constructors/destructors |
---|
4 | Curve() |
---|
5 | Curve(const char *name); |
---|
6 | Curve(const char *name, const char *label, |
---|
7 | const char *desc, const char *group); |
---|
8 | Curve(const Curve& o); |
---|
9 | ~Curve (); |
---|
10 | |
---|
11 | methods |
---|
12 | const char *name() const; |
---|
13 | void name(const char *val); |
---|
14 | |
---|
15 | const char *path() const; |
---|
16 | void path(const char *val); |
---|
17 | |
---|
18 | const char *label() const; |
---|
19 | void label(const char *val); |
---|
20 | |
---|
21 | const char *desc() const; |
---|
22 | void desc(const char *val); |
---|
23 | |
---|
24 | const char *hints() const; |
---|
25 | void hints(const char *val); |
---|
26 | |
---|
27 | const char *color() const; |
---|
28 | void color(const char *val); |
---|
29 | |
---|
30 | Array1D *axis(const char *name, const char *label, |
---|
31 | const char *desc, const char *units, |
---|
32 | const char *scale, const char *val, size_t size); |
---|
33 | |
---|
34 | Curve& delAxis(const char *name); |
---|
35 | |
---|
36 | size_t data(const char *label, const double **arr) const; |
---|
37 | |
---|
38 | Array1D *getAxis(const char *name) const; |
---|
39 | |
---|
40 | Array1D *getNthAxis(size_t n) const; |
---|
41 | |
---|
42 | const char *group() const; |
---|
43 | void group(const char *g); |
---|
44 | |
---|
45 | size_t dims() const; |
---|
46 | |
---|
47 | const void *property (const char *key) const; |
---|
48 | void property (const char *key, const void *val, size_t nbytes); |
---|
49 | |
---|
50 | const char *propstr (const char *key) const; |
---|
51 | void propstr (const char *key, const char *val); |
---|
52 | |
---|
53 | void propremove (const char *key); |
---|
54 | |
---|
55 | void vvalue(void *storage, size_t numHints, va_list arg) const; |
---|
56 | |
---|
57 | void configure(size_t as, ClientData c); |
---|
58 | void dump(size_t as, ClientData c); |
---|
59 | |
---|
60 | Outcome &outcome() const; |
---|
61 | |
---|
62 | const int is() const; |
---|
63 | |
---|
64 | --------------------------------------- |
---|
65 | |
---|
66 | const char *name() |
---|
67 | Purpose: get the id name of the object |
---|
68 | Input Arguments: None |
---|
69 | Return Value: the id name stored in the object. |
---|
70 | Notes: if no name is set, NULL will be returned |
---|
71 | the id name is used to identify this object from |
---|
72 | all other objects and should be unique |
---|
73 | Code Example: |
---|
74 | |
---|
75 | void name(const char *val) |
---|
76 | Purpose: set the id name of the object |
---|
77 | Input Arguments: 1 |
---|
78 | 1. const char *val - new id name |
---|
79 | Return Value: None |
---|
80 | Notes: a copy of the memory location val will be stored |
---|
81 | Code Example: |
---|
82 | |
---|
83 | const char *path() |
---|
84 | Purpose: get the path of the object |
---|
85 | Input Arguments: None |
---|
86 | Return Value: the path stored in the object. |
---|
87 | Notes: if no path is set, NULL will be returned |
---|
88 | the path tells where this object sits in the |
---|
89 | hierarchy of objects. |
---|
90 | Code Example: |
---|
91 | |
---|
92 | void path(const char *val) |
---|
93 | Purpose: set the path of the object |
---|
94 | Input Arguments: 1 |
---|
95 | 1. const char *val - new path |
---|
96 | Return Value: None |
---|
97 | Notes: a copy of the memory location val will be stored |
---|
98 | Code Example: |
---|
99 | |
---|
100 | const char *label() |
---|
101 | Purpose: get the label of the object |
---|
102 | Input Arguments: None |
---|
103 | Return Value: the label stored in the object. |
---|
104 | Notes: if no label is set, NULL will be returned |
---|
105 | the label is used by the graphical user interface. |
---|
106 | Code Example: |
---|
107 | |
---|
108 | void label(const char *val) |
---|
109 | Purpose: set the label of the object |
---|
110 | Input Arguments: 1 |
---|
111 | 1. const char *val - new label |
---|
112 | Return Value: None |
---|
113 | Notes: a copy of the memory location val will be stored |
---|
114 | Code Example: |
---|
115 | |
---|
116 | const char *desc() |
---|
117 | Purpose: get the description of the object |
---|
118 | Input Arguments: None |
---|
119 | Return Value: the description stored in the object. |
---|
120 | Notes: if no description is set, NULL will be returned |
---|
121 | the description is used by the graphical user |
---|
122 | interface to describe what type of data is being |
---|
123 | requested and how the input is used. |
---|
124 | Code Example: |
---|
125 | |
---|
126 | void desc(const char *val) |
---|
127 | Purpose: set the description of the object |
---|
128 | Input Arguments: 1 |
---|
129 | 1. const char *val - new description |
---|
130 | Return Value: None |
---|
131 | Notes: a copy of the memory location val will be stored |
---|
132 | Code Example: |
---|
133 | |
---|
134 | const char *hints() |
---|
135 | Purpose: get the hints of the object |
---|
136 | Input Arguments: None |
---|
137 | Return Value: the hints stored in the object. |
---|
138 | Notes: if no hints are set, NULL will be returned |
---|
139 | the hints are used by the graphical user interface |
---|
140 | Code Example: |
---|
141 | |
---|
142 | void hints(const char *val) |
---|
143 | Purpose: set the hints of the object |
---|
144 | Input Arguments: 1 |
---|
145 | 1. const char *val - new hints |
---|
146 | Return Value: None |
---|
147 | Notes: a copy of the memory location val will be stored |
---|
148 | Code Example: |
---|
149 | |
---|
150 | Array1D *axis(const char *name, const char *label, |
---|
151 | const char *desc, const char *units, |
---|
152 | const char *scale, const char *val, size_t size); |
---|
153 | Purpose: get a generic property from the property database |
---|
154 | Input Arguments: 7 |
---|
155 | 1. const char *name - axis id |
---|
156 | 2. const char *label - axis label |
---|
157 | 3. const char *desc - description of axis |
---|
158 | 4. const char *units - units of axis |
---|
159 | 5. const char *scale - scale of axis |
---|
160 | 6. const double *val - array of data values as doubles |
---|
161 | 7. size_t size - number of data values |
---|
162 | Return Value: pointer to newly created Array1D object |
---|
163 | Notes: valid options for scale are "log" and NULL. The newly |
---|
164 | created Array1D object is stored in the Curve object. |
---|
165 | Code Example: |
---|
166 | |
---|
167 | Curve& delAxis(const char *name); |
---|
168 | Purpose: delete an axis stored in the object with the id |
---|
169 | matching the string stored in "name". |
---|
170 | Input Arguments: 1 |
---|
171 | 1. const char *name - id of the axis to delete |
---|
172 | Return Value: None |
---|
173 | Notes: memory for the Array1D object is free'd |
---|
174 | Code Example: |
---|
175 | |
---|
176 | size_t data(const char *label, const double **arr) const; |
---|
177 | Purpose: retrieve the data associated with the axis named "label". |
---|
178 | Input Arguments: 2 |
---|
179 | 1. const char *label - name of axis holding the data |
---|
180 | 2. const double **arr - pointer to returned data |
---|
181 | Return Value: number of elements in the returned array *arr |
---|
182 | Notes: None |
---|
183 | Code Example: |
---|
184 | |
---|
185 | Array1D *getAxis(const char *name) const; |
---|
186 | Purpose: retrieve a pointer to a Array1D object representing |
---|
187 | the axis named "name" |
---|
188 | Input Arguments: 1 |
---|
189 | 1. const char *name - name of the axis to retrieve |
---|
190 | Return Value: pointer to Array1D object representing an axis |
---|
191 | Notes: None |
---|
192 | Code Example: |
---|
193 | |
---|
194 | Array1D *getNthAxis(size_t n) const; |
---|
195 | Purpose: retrieve the n'th axis of this Curve object |
---|
196 | Input Arguments: 1 |
---|
197 | 1. size_t n - number of the axis to retrieve |
---|
198 | Return Value: pointer to the n'th Array1D object |
---|
199 | Notes: None |
---|
200 | Code Example: |
---|
201 | |
---|
202 | const char *group() const; |
---|
203 | Purpose: get the group this Curve object is associated with |
---|
204 | Input Arguments: 0 |
---|
205 | Return Value: the group this Curve object is associated with |
---|
206 | Notes: None |
---|
207 | Code Example: |
---|
208 | |
---|
209 | void group(const char *g); |
---|
210 | Purpose: set the group this Curve object is associated with |
---|
211 | Input Arguments: 1 |
---|
212 | 1. const char *g - newly associated group name |
---|
213 | Return Value: None |
---|
214 | Notes: None |
---|
215 | Code Example: |
---|
216 | |
---|
217 | size_t dims() const; |
---|
218 | Purpose: get the number of dimensions (axis) |
---|
219 | Input Arguments: 0 |
---|
220 | Return Value: number of dimensions |
---|
221 | Notes: None |
---|
222 | Code Example: |
---|
223 | |
---|
224 | const void *property (const char *key) const; |
---|
225 | Purpose: get a generic property from the property database |
---|
226 | Input Arguments: 1 |
---|
227 | 1. const char *key - property name |
---|
228 | Return Value: value of the property |
---|
229 | Notes: None |
---|
230 | Code Example: |
---|
231 | |
---|
232 | void property (const char *key, const void *val, size_t nbytes); |
---|
233 | Purpose: set a generic property in the property database |
---|
234 | Input Arguments: 3 |
---|
235 | 1. const char *key - property name |
---|
236 | 2. const void *val - property value |
---|
237 | 3. size_t nbytes - size (in bytes) of the value |
---|
238 | Return Value: None |
---|
239 | Notes: A copy of the memory pointed to by val is stored |
---|
240 | in the property database |
---|
241 | Code Example: |
---|
242 | |
---|
243 | const char *propstr (const char *key) const; |
---|
244 | Purpose: get a string property from the property database |
---|
245 | Input Arguments: 1 |
---|
246 | 1. const char *key - property name |
---|
247 | Return Value: value of the property |
---|
248 | Notes: None |
---|
249 | Code Example: |
---|
250 | |
---|
251 | void propstr (const char *key, const char *val); |
---|
252 | Purpose: set a string property in the property database |
---|
253 | Input Arguments: 2 |
---|
254 | 1. const char *key - property name |
---|
255 | 2. const char *val - property value |
---|
256 | Return Value: None |
---|
257 | Notes: A copy of the memory pointed to by val is stored |
---|
258 | in the property database |
---|
259 | Code Example: |
---|
260 | |
---|
261 | void propremove (const char *key); |
---|
262 | Purpose: remove a property from the property database |
---|
263 | Input Arguments: 1 |
---|
264 | 1. const char *key - property name |
---|
265 | Return Value: value of the property |
---|
266 | Notes: None |
---|
267 | Code Example: |
---|
268 | |
---|
269 | void vvalue(void *storage, size_t numHints, va_list arg) const; |
---|
270 | Purpose: return the value of the object after applying a |
---|
271 | varying number of hints about how the value |
---|
272 | should be configured |
---|
273 | Input Arguments: 3 |
---|
274 | 1. void *storage - the return value |
---|
275 | 2. size_t numHints - number of hints provided |
---|
276 | 3. va_list arg - list of hints specified as a va_list |
---|
277 | Return Value: None |
---|
278 | Notes: vvalue will parse out the recognisable hints from |
---|
279 | va_list arg. Values stored in the object are |
---|
280 | not changed. |
---|
281 | Code Example: |
---|
282 | |
---|
283 | void configure(size_t as, ClientData c); |
---|
284 | Purpose: configure the object based on the data in "c". |
---|
285 | use "as" to determine the type of data in "c". |
---|
286 | Input Arguments: 2 |
---|
287 | 1. size_t as - type of data stored in "c". |
---|
288 | valid values include: |
---|
289 | RPCONFIG_XML |
---|
290 | RPCONFIG_TREE |
---|
291 | 2. ClientData c - data to configure the object from. |
---|
292 | if as is... then c should be... |
---|
293 | RPCONFIG_XML const char *xmltext |
---|
294 | RPCONFIG_TREE RP_ParserXML *object |
---|
295 | Return Value: None |
---|
296 | Notes: object is configured based on values in "c" |
---|
297 | Code Example: |
---|
298 | |
---|
299 | void dump(size_t as, ClientData c); |
---|
300 | Purpose: dump the object values based to the object "c". |
---|
301 | use "as" to determine how to dump the data. |
---|
302 | Input Arguments: 2 |
---|
303 | 1. size_t as - type of data stored in "c". |
---|
304 | valid values include: |
---|
305 | RPCONFIG_XML |
---|
306 | RPCONFIG_TREE |
---|
307 | 2. ClientData c - data to configure the object from. |
---|
308 | if as is... then c should be... |
---|
309 | RPCONFIG_XML ClientDataXml *object |
---|
310 | RPCONFIG_TREE RP_ParserXML *object |
---|
311 | Return Value: None |
---|
312 | Notes: None |
---|
313 | Code Example: |
---|
314 | |
---|
315 | Outcome &outcome() const; |
---|
316 | Purpose: return the status of this object as an Outcome. |
---|
317 | Input Arguments: 0 |
---|
318 | Return Value: status of the object as an Outcome |
---|
319 | Notes: None |
---|
320 | Code Example: |
---|
321 | |
---|
322 | const int is() const; |
---|
323 | Purpose: return an integer tag describing the object. |
---|
324 | Input Arguments: 0 |
---|
325 | Return Value: integer tag unique to all number objects |
---|
326 | Notes: None |
---|
327 | Code Example: |
---|