SdsExport - Export an object into an external buffer

Function

Export an object into an external buffer

Description

Export an object into an external buffer.

Once exported an object can be moved around in memory, written to a file etc., and subsequently returned to the SDS system either by using SdsImport to import it back into the system, or SdsAccess, to access it as an external object.

The original internal version of the object continues to exist, in addition to the external copy. All identifiers to the object continue to refer to the original internal copy.

With SdsExport, any undefined primitive data items occupy no space in the exported item, and cannot be written or read until the item is reimported. This enables the creation of compact templates for structures which may contain large arrays. If this behaviour is not wanted use SdsExportDefined, which allocates full space in the external structure for undefined primitive items.

The length of the buffer required for SdsExport can be determined by a call to SdsSize.

Language

C

Declaration

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

Parameters

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

>idSdsIdTypeIdentifier of the structure to be exported.
>lengthunsigned longSize in bytes of the buffer.
<datavoid*The buffer into which the object will be exported.
!statusStatusType*Modified status. Possible failure codes are:

SDS__BADID The identifier is invalid.
SDS__TOOLONG The object is too large for the buffer
SDS__EXTERN The object is 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 tony.farrell@mq.edu.au