User`s guide

mwArray Get(const char* name, mwSize num_indices,
...)
Purpose Return single element at specified field name and 1-based index in
struct array
C++
Syntax
#include "mclcppclass. h"
const char* fields[] = {"a", "b", "c"};
mwArray a(1, 1, 3, fields);
mwArray b = a.Get("a", 1, 1); // b=a.a(1)
mwArray b = a.Get("b", 2, 1, 1); // b=a.b(1,1)
Arguments name
NULL-terminated string containing the field name to get.
num_indices
Number o f indices passed in.
...
Comma-separated list of input indices. Number of items must
equal
num_indices.
Return
Value
An mwArray containing the value at the specified field name and index.
Description Usethismethodtofetchasingleelementataspecifiedfieldname
and index. This m ethod may only be called on an array that is of
type
mxSTRUCT_CLASS.AnmwException is thrown if the underlying
array is not a
struct array. The field n ame passed must be a valid
field name in the
struct array. The index is passed by first passing
the number of indices follo wed by a comma-separated list of 1-based
indices. The valid number of indices that can be passed in is either 1
(single subscript indexing), in which case the element at the specified
1-based o ffset is returned, accessing data in column-wise order, or
NumberOfDimensions() (mul tiple subscript indexing), in which cas e,
the index list is used to access the specified element. The valid range
for indices is
1 <= index <= NumberOfElements(), for single subscript
indexing. For multiple subscript indexing, the ith index has the
valid range:
1 <= index[i] <= GetDimensions().Get(1, i).An
C-70