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.
> | id | SdsIdType | Identifier of the structure to be exported. |
---|---|---|---|
> | length | unsigned long | Size in bytes of the buffer. |
< | data | void* | The buffer into which the object will be exported. |
! | status | StatusType* | 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. |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au