60 |
Default constructor for DataTagged. Creates a DataTagged object for which |
Default constructor for DataTagged. Creates a DataTagged object for which |
61 |
the only data-point is a scalar data-point with value 0.0. All tags |
the only data-point is a scalar data-point with value 0.0. All tags |
62 |
will map to this single data-point. |
will map to this single data-point. |
63 |
T |
T |
64 |
*/ |
*/ |
65 |
DataTagged(); |
DataTagged(); |
66 |
|
|
79 |
will be generated. |
will be generated. |
80 |
\param defaultValue - Input - Value returned if a requested tag doesn't exist. |
\param defaultValue - Input - Value returned if a requested tag doesn't exist. |
81 |
\param what - Input - A description of what this data represents. |
\param what - Input - A description of what this data represents. |
82 |
T |
T |
83 |
*/ |
*/ |
84 |
DataTagged(const TagListType& tagKeys, |
DataTagged(const TagListType& tagKeys, |
85 |
const ValueListType& values, |
const ValueListType& values, |
119 |
\brief |
\brief |
120 |
Copy Constructor for DataTagged. |
Copy Constructor for DataTagged. |
121 |
Performs a deep copy from the given DataTagged object. |
Performs a deep copy from the given DataTagged object. |
122 |
|
T |
123 |
*/ |
*/ |
124 |
DataTagged(const DataTagged& other); |
DataTagged(const DataTagged& other); |
125 |
|
|
128 |
Copy Constructor for DataTagged. |
Copy Constructor for DataTagged. |
129 |
Construct a tagged data from a DataConstant object. |
Construct a tagged data from a DataConstant object. |
130 |
The default value will be that held by the DataConstant object. |
The default value will be that held by the DataConstant object. |
131 |
|
T |
132 |
*/ |
*/ |
133 |
DataTagged(const DataConstant& other); |
DataTagged(const DataConstant& other); |
134 |
|
|
141 |
sample will be visible via the returned pointer. |
sample will be visible via the returned pointer. |
142 |
|
|
143 |
** This provides an interface into the data suitable for legacy C code. |
** This provides an interface into the data suitable for legacy C code. |
144 |
|
** NB: need to do array bounds checking when accessing returned value! |
145 |
|
T |
146 |
*/ |
*/ |
147 |
virtual |
virtual |
148 |
double* |
double* |
153 |
Write the data as a string. |
Write the data as a string. |
154 |
Writes out each tag, including the default, and the data-point which is |
Writes out each tag, including the default, and the data-point which is |
155 |
associated with each tag. |
associated with each tag. |
156 |
T |
T |
157 |
*/ |
*/ |
158 |
virtual |
virtual |
159 |
std::string |
std::string |
163 |
\brief |
\brief |
164 |
Return the tag number associated with the given data-point number |
Return the tag number associated with the given data-point number |
165 |
according to the associated function space. |
according to the associated function space. |
166 |
T |
T |
167 |
*/ |
*/ |
168 |
virtual |
virtual |
169 |
int |
int |
179 |
|
|
180 |
\param sampleNo - Input - sample number. |
\param sampleNo - Input - sample number. |
181 |
\param dataPointNo - Input - data-point number. |
\param dataPointNo - Input - data-point number. |
182 |
T |
T |
183 |
*/ |
*/ |
184 |
virtual |
virtual |
185 |
ValueType::size_type |
ValueType::size_type |
186 |
getPointOffset(int sampleNo, |
getPointOffset(int sampleNo, |
193 |
Description: |
Description: |
194 |
Add the given tags and values to this DataTagged object, by repeatedly |
Add the given tags and values to this DataTagged object, by repeatedly |
195 |
using addTaggedValue for each given tag/value pair. |
using addTaggedValue for each given tag/value pair. |
196 |
\param tagKeys - Input - A vector of integer keys. |
\param tagKeys - Input - A vector of integer tags. |
197 |
\param values - Input - A vector of DataArrayViews. If this is empty |
\param values - Input - A vector of DataArrayViews. If this is empty |
198 |
then all given tags will be assigned a value of zero. If |
then all given tags will be assigned a value of zero. If |
199 |
it contains one value all tags will be assigned the same value. |
it contains one value all tags will be assigned the same value. |
200 |
Otherwise if there is a mismatch between the number of tags and |
Otherwise if there is a mismatch between the number of tags and |
201 |
the number of values an exception will be generated. |
the number of values an exception will be generated. |
202 |
|
T |
203 |
*/ |
*/ |
204 |
void |
void |
205 |
addTaggedValues(const TagListType& tagKeys, |
addTaggedValues(const TagListType& tagKeys, |
214 |
a value associated with it, setTaggedValue will be used to update this value. |
a value associated with it, setTaggedValue will be used to update this value. |
215 |
\param tagKey - Input - Integer key. |
\param tagKey - Input - Integer key. |
216 |
\param value - Input - Single DataArrayView value to be assigned to the tag. |
\param value - Input - Single DataArrayView value to be assigned to the tag. |
217 |
|
T |
218 |
*/ |
*/ |
219 |
void |
void |
220 |
addTaggedValue(int tagKey, |
addTaggedValue(int tagKey, |
233 |
it contains one value all tag values will be assigned the same value. |
it contains one value all tag values will be assigned the same value. |
234 |
Otherwise if there is a mismatch between the number of keys and |
Otherwise if there is a mismatch between the number of keys and |
235 |
the number of values an exception will be generated. |
the number of values an exception will be generated. |
236 |
|
T |
237 |
*/ |
*/ |
238 |
void |
void |
239 |
setTaggedValues(const TagListType& tagKeys, |
setTaggedValues(const TagListType& tagKeys, |
248 |
associated with it, addTaggedValue will be used to add this tag/value pair. |
associated with it, addTaggedValue will be used to add this tag/value pair. |
249 |
\param tagKey - Input - Integer key. |
\param tagKey - Input - Integer key. |
250 |
\param value - Input - Single DataArrayView value to be assigned to the tag. |
\param value - Input - Single DataArrayView value to be assigned to the tag. |
251 |
|
T |
252 |
*/ |
*/ |
253 |
virtual |
virtual |
254 |
void |
void |
262 |
Description: |
Description: |
263 |
Return a view into the data-point associated with the given tag. |
Return a view into the data-point associated with the given tag. |
264 |
\param tag - Input - Integer key. |
\param tag - Input - Integer key. |
265 |
T |
T |
266 |
*/ |
*/ |
267 |
DataArrayView |
DataArrayView |
268 |
getDataPointByTag(int tag) const; |
getDataPointByTag(int tag) const; |
276 |
and data-point numbers. |
and data-point numbers. |
277 |
\param sampleNo - Input. |
\param sampleNo - Input. |
278 |
\param dataPointNo - Input. |
\param dataPointNo - Input. |
279 |
T |
T |
280 |
*/ |
*/ |
281 |
virtual |
virtual |
282 |
DataArrayView |
DataArrayView |
289 |
|
|
290 |
Description: |
Description: |
291 |
Return a reference to the tag offset lookup table. |
Return a reference to the tag offset lookup table. |
292 |
T |
T |
293 |
*/ |
*/ |
294 |
const DataMapType& |
const DataMapType& |
295 |
getTagLookup() const; |
getTagLookup() const; |
303 |
|
|
304 |
NOTE: The DataTagged tag map does not necessarily coincide with the tag |
NOTE: The DataTagged tag map does not necessarily coincide with the tag |
305 |
keys in the associated function space. |
keys in the associated function space. |
306 |
T |
T |
307 |
*/ |
*/ |
308 |
bool |
bool |
309 |
isCurrentTag(int tag) const; |
isCurrentTag(int tag) const; |
310 |
|
|
315 |
Description: |
Description: |
316 |
Return the default value. This value is associated with any tag which |
Return the default value. This value is associated with any tag which |
317 |
is not explicitly recorded in this DataTagged object's tag map. |
is not explicitly recorded in this DataTagged object's tag map. |
318 |
T |
T |
319 |
*/ |
*/ |
320 |
DataArrayView& |
DataArrayView& |
321 |
getDefaultValue(); |
getDefaultValue(); |
329 |
|
|
330 |
Description: |
Description: |
331 |
Return the number of doubles stored for the Data. |
Return the number of doubles stored for the Data. |
332 |
T |
T |
333 |
*/ |
*/ |
334 |
virtual |
virtual |
335 |
ValueType::size_type |
ValueType::size_type |