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

◆ Export()

template<class ContainerType >
void drama::sds::Id::Export ( ContainerType container) const
inline

Export the SDS structure into a buffer.

The SDS structure refered to by this sds::Id object is exported into the specified buffer.

Note that if any of the underlying data is not defined (say because you created a new item but have not yet put any data into it) then the size will not include space for the data itself. This is acceptable to SDS but may not be what you expect.
To create the required space in the exported object, use the sds::Id::ExportDefined method.

See also
SdsExport()
sds::Id::ExportDefined
Template Parameters
ContainerTypeA container that has a size() method and for which "&container[0]" will return the address of a byte array into which the data can be written. The size() method is used to retrieve the available memory space. 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 write the data into.

References drama::CreateRunDramaTask(), and DramaTHROW.