SdsPointer - Get a pointer to the data of a primitive item

Function

Get a pointer to the data of a primitive item

Description

Return a pointer to the data of a primitive item. Also return the length of the item. If the data item is undefined and the object is internal storage for the data will be created.

SdsPointer 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 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.

Language

C

Declaration

void SdsPointer(SdsIdType id, void **data, unsigned long *length, StatusType * SDSCONST status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>idSdsIdTypeIdentifier of the primitive item.
<datavoid**Address of a variable to hold the pointer.
<lengthunsigned long*Length of the data.
!statusStatusType*Modified status. Possible failure codes are:

SDS__NOMEM Insufficient memory for creation
SDS__NOTPRIM Not a primitive item
SDS__UNDEFINED Data undefined, and object external

Support

Jeremy Bailey, {AAO}

Version date

18-Oct-91

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aao.gov.au