AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ Pointer()

template<typename T >
void drama::sds::Id::Pointer ( T **  data,
unsigned long length = 0 
) const
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.

Warning
This operation's const-ness depends on your point of view. It does not in itself change the underlying SDS structure or its contents, but one you have a pointer, you could change the data.
See also
SdsPointer()
SdsFlush()
sds::Id::Flush
Template Parameters
TThe type of the data item. This needs to be a of standard layout, trivial (Plain old data) types, if not, compile will fail with a static assertion.
Parameters
dataThe address of a item to return the pointer to.
lengthIf specified, the length of the data is returned here.

References drama::CreateRunDramaTask(), and DramaTHROW.