|
AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
|
inline |
Obtain a pointer to the data area of a primitive SDS item.
Return a pointer to the data of a primitive item. If the data item is undefined and the object is internal, storage for the data will be created. This can only be used with primitive items, not with structures.
If necessary (e.g. if the data originated on a machine with different architecture) the data for the object is converted (in place) from the format stored in the data item to that required for the local machine
If the data pointed to by the pointer is updated by a calling program, the program should then call the function SdsFlush()/ sds::Id::Flush() to ensure that the data is updated in the original structure. This is necessary because implementations on some machine architectures may have to use a copy of the data rather than the actual data when returning a pointer.
| T | The type of the data item. This needs to be a of standard layout types, if not, compile will fail with a static assertion. |
| data | The address of a item to return the pointer to. |
| length | If specified, the length of the data is returned here. |
References drama::CreateRunDramaTask(), and DramaTHROW.