Zen API
|
kStatus kSerializer_BeginWrite | ( | kSerializer | serializer, |
kType | sizeType, | ||
kBool | includeSize | ||
) |
Begins writing a measured section of data, using an 8, 16, 32, or 64-bit integer to record the size.
BeginWrite can be called multiple times before calling EndWrite, in order to nest write sections. Each call to BeginWrite pushes information onto a stack; this information is popped from the stack by calling EndWrite.
Accordingly, it is the caller's responsibility to ensure that either 1) EndWrite is called once for each call to BeginWrite, or 2) the kSerializer_Reset method is called to clear serialization state in the event of errors. Note that some kSerializer subclasses, including kDat5Serializer and kDat6Serializer, will automatically call kSerializer_Reset if errors are encountered during object serialization. However, this behaviour not guaranteed for other serialization classes.
serializer | Serializer object. |
sizeType | Type of size field (k8u, k16u, k32u, or k64u) |
includeSize | Include the size of the size field in the written size? |