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

◆ CreateByAccess()

template<class ContainerType >
static Id drama::sds::Id::CreateByAccess ( ContainerType container)
inlinestatic

Factory constructor method that accesses an exported SDS structure found in a byte stream.

This static factory sds::Id constructor uses SdsAccess() to get access an SDS structure stored in an external byte stream.

SDS accesses the data in place and may modify it the data values. But the structure layout cannot be modified.

See also
SdsAccess().
sds::Id::Import
Template Parameters
ContainerTypeA container for which "&container[0]" will return the address of a byte array into which the data can be written. The empty() method is also applied. E.g. std::array<unsigned char> or std::vector<unsigned char>. The container must be a container of standard layout, trivial (Plain old data) types, if not, compile will fail with a static assertion.
Parameters
containerThe buffer to read the data from. Must not be deallocated or reallocated until the SDS object create by this constructor is destroyed. Note, SDS can modify this buffer.
Returns
An Id providing a reference to the structure.

References drama::CreateRunDramaTask(), and DramaTHROW.