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

◆ CreateByImport()

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

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

This static factory sds::Id constructor uses SdsImport() to imported an SDS structure stored in a byte stream into SDS. Since the result is an internal SDS item, the structure can be modified (both data values and layout).

See also
SdsImport().
sds::Id::Access
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.
Returns
An Id providing a reference to the structure.

References drama::CreateRunDramaTask(), and DramaTHROW.