AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
◆ ArrayAccess() [2/4]
Access the data of an SDS primitive item array. Any dimensions. Accesses an array using an ArrayWriteHelper or ArrayReadHelper of the appropriate type. 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 mult-idimensional arrays must be indexed by calculating the single dimensional index (otherwise the type definitions are too hard). In this example, we instantiate value to provide access to an array of SDS short items, of unknown dimensions. sds::Id structure; ... std::vector<unsigned long> dims; sds::ArrayAccessHelper value; structure.ArrayAccess(&value, dims); unsigned long count = value.Size(); for (unsigned long i = 0; i < count ; ++i) printf("Element %ld = %d\\n", i, (int)value[i]);
References ArrayAccess(), drama::CreateRunDramaTask(), and GetDims(). |
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:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8