AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
|
◆ ArrayAccess() [3/4]
template<typename T >
Access the data of an SDS array. Accesses an array using an SdsArrayAccessHelper of the appropiate type. This version allows access to an array of a specified number of dimensions. Various other versions also exist. On return, "data[index]" can be used to access the array element at the specified index. See the SdsArrayAccessHelper:: class for more information. Note that Multidimensional arrays must be indexed by calculating the equivalent single dimensional index (otherwise the type definitions are too hard). In this example, SdsArrayShort is a sub-class of SdsArrayAccessHelper. SdsId structure; ... unsigned long dims[SDS_C_MAXARRAYDIMS]; SdsArrayShort value; structure.ArrayAccess(&value, 1, dims, status); if (*status == STATUS__OK) { for (unsigned long i = 0; i < dims[0] ; ++i) printf("Element %ld = %d\\n", i, (int)value[i]); }
References SdsArrayAccessHelper< T >::Code(). |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Dec 12 2024 23:07:38 for AAO DRAMA C++ Interface (Old style) by 1.9.8