Zen API

- Home
- Help Topics
- Types by Category
- All Types
- Files

All Classes Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions
kDat5Serializer Class Reference
kApi/Io

## Description

Serializes/deserializes objects to/from kDat5 format.

Inheritance diagram for kDat5Serializer:

## Public Member Functions
kStatus | kDat5Serializer_Construct (kDat5Serializer *serializer, kStream stream, kAlloc allocator)
| Constructs a kDat5Serializer object. More...
kAlloc | kObject_Alloc (kObject object)
| Gets the memory allocator associated with this object. More...
kStatus | kObject_Clone (kObject *object, kObject source, kAlloc allocator)
| Constructs a new object by copying an existing object, including any aggregated child elements. More...
kStatus | kObject_Destroy (kObject object)
| Destroys the object. More...
kStatus | kObject_Dispose (kObject object)
| Destroys the object and any aggregated child elements. More...
kBool | kObject_Equals (kObject object, kObject other)
| Determines whether the object is equal to another object. More...
kSize | kObject_HashCode (kObject object)
| Gets a hash code representing the state of this object. More...
kBool | kObject_Is (kObject object, kType type)
| Determines whether this object is an instance of the specified type. More...
kBool | kObject_IsShared (kObject object)
| Reports whether the object is currently shared (reference count greater than one). More...
kStatus | kObject_SetPool (kObject object, kObjectPool pool)
| Sets the object pool associated with this object. More...
kStatus | kObject_Share (kObject object)
| Increments the reference count associated with this object. More...
kSize | kObject_Size (kObject object)
| Estimates the memory consumed by this object, including any aggregated child elements. More...
kType | kObject_Type (kObject object)
| Returns the type of the object. More...
kStatus | kSerializer_AdvanceRead (kSerializer serializer, kSize offset)
| Reads and discards a specified number of bytes. More...
kStatus | kSerializer_BeginRead (kSerializer serializer, kType sizeType, kBool includeSize)
| Begins reading a measured data section. More...
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. More...
kStatus | kSerializer_Construct (kSerializer *serializer, kStream stream, kType serializerType, kAlloc allocator)
| Constructs a serializer object using the specified serialization format. More...
kStatus | kSerializer_EndRead (kSerializer serializer)
| Ends reading a measured data section. More...
kStatus | kSerializer_EndWrite (kSerializer serializer)
| Ends writing a measured data section. More...
kStatus | kSerializer_Flush (kSerializer serializer)
| Flushes the serializer write buffer to the underlying stream. More...
kStatus | kSerializer_LoadObject (kObject *object, kType serializerType, const kChar *filePath, kAlloc readAlloc)
| Loads an object from file using the specified serializer type. More...
kStatus | kSerializer_Read16s (kSerializer serializer, k16s *data)
| Reads a k16s value. More...
kStatus | kSerializer_Read16sArray (kSerializer serializer, k16s *data, kSize count)
| Reads a k16s array. More...
kStatus | kSerializer_Read16u (kSerializer serializer, k16u *data)
| Reads a k16u value. More...
kStatus | kSerializer_Read16uArray (kSerializer serializer, k16u *data, kSize count)
| Reads a k16u array. More...
kStatus | kSerializer_Read32f (kSerializer serializer, k32f *data)
| Reads a k32f value. More...
kStatus | kSerializer_Read32fArray (kSerializer serializer, k32f *data, kSize count)
| Reads a k32f array. More...
kStatus | kSerializer_Read32s (kSerializer serializer, k32s *data)
| Reads a k32s value. More...
kStatus | kSerializer_Read32sArray (kSerializer serializer, k32s *data, kSize count)
| Reads a k32s array. More...
kStatus | kSerializer_Read32u (kSerializer serializer, k32u *data)
| Reads a k32u value. More...
kStatus | kSerializer_Read32uArray (kSerializer serializer, k32u *data, kSize count)
| Reads a k32u array. More...
kStatus | kSerializer_Read64f (kSerializer serializer, k64f *data)
| Reads a k64f value. More...
kStatus | kSerializer_Read64fArray (kSerializer serializer, k64f *data, kSize count)
| Reads a k64f array. More...
kStatus | kSerializer_Read64s (kSerializer serializer, k64s *data)
| Reads a k64s value. More...
kStatus | kSerializer_Read64sArray (kSerializer serializer, k64s *data, kSize count)
| Reads a k64s array. More...
kStatus | kSerializer_Read64u (kSerializer serializer, k64u *data)
| Reads a k64u value. More...
kStatus | kSerializer_Read64uArray (kSerializer serializer, k64u *data, kSize count)
| Reads a k64u array. More...
kStatus | kSerializer_Read8s (kSerializer serializer, k8s *data)
| Reads a k8s value. More...
kStatus | kSerializer_Read8sArray (kSerializer serializer, k8s *data, kSize count)
| Reads a k8s array. More...
kStatus | kSerializer_Read8u (kSerializer serializer, k8u *data)
| Reads a k8u value. More...
kStatus | kSerializer_Read8uArray (kSerializer serializer, k8u *data, kSize count)
| Reads a k8u array. More...
kStatus | kSerializer_ReadByte (kSerializer serializer, kByte *data)
| Reads a kByte value. More...
kStatus | kSerializer_ReadByteArray (kSerializer serializer, kByte *data, kSize count)
| Reads a kByte array. More...
kStatus | kSerializer_ReadChar (kSerializer serializer, kChar *data)
| Reads a kChar value. More...
kStatus | kSerializer_ReadCharArray (kSerializer serializer, kChar *data, kSize count)
| Reads a kChar array. More...
kBool | kSerializer_ReadCompleted (kSerializer serializer)
| Determines whether the current measured read section has more bytes. More...
kStatus | kSerializer_ReadItems (kSerializer serializer, kType type, kTypeVersion version, void *items, kSize count)
| Reads an array of values or objects. More...
kStatus | kSerializer_ReadObject (kSerializer serializer, kObject *object, kAlloc allocator)
| Reads an object from the underlying stream. More...
kStatus | kSerializer_ReadSize (kSerializer serializer, kSize *data)
| Reads a kSize value. More...
kStatus | kSerializer_ReadSizeArray (kSerializer serializer, kSize *data, kSize count)
| Reads a kSize array. More...
kStatus | kSerializer_ReadSSize (kSerializer serializer, kSSize *data)
| Reads a kSSize value. More...
kStatus | kSerializer_ReadSSizeArray (kSerializer serializer, kSSize *data, kSize count)
| Reads a kSSize array. More...
kStatus | kSerializer_ReadText (kSerializer serializer, kChar *data, kSize capacity)
| Reads a null-terminated kChar array. More...
kStatus | kSerializer_ReadType (kSerializer serializer, kType *type, kTypeVersion *version)
| Reads a type code. More...
kStatus | kSerializer_Reset (kSerializer serializer)
| Discards any streaming context accumulated by the serializer. More...
kStatus | kSerializer_SaveObject (kObject object, kType serializerType, const kChar *filePath)
| Saves an object to file using the specified serializer type. More...
kStatus | kSerializer_SetSizeEncoding (kSerializer serializer, k32u byteCount)
| Explicitly sets the number of bytes used to encode/decode kSize and kSSize values. More...
kStatus | kSerializer_SetVersion (kSerializer serializer, kAssembly assembly, kVersion version)
| Sets the version to use when serializing types. More...
kStream | kSerializer_Stream (kSerializer serializer)
| Gets the underlying stream. More...
kStatus | kSerializer_Write16s (kSerializer serializer, k16s data)
| Writes a k16s value. More...
kStatus | kSerializer_Write16sArray (kSerializer serializer, const k16s *data, kSize count)
| Writes a k16s array. More...
kStatus | kSerializer_Write16u (kSerializer serializer, k16u data)
| Writes a k16u value. More...
kStatus | kSerializer_Write16uArray (kSerializer serializer, const k16u *data, kSize count)
| Writes a k16u array. More...
kStatus | kSerializer_Write32f (kSerializer serializer, k32f data)
| Writes a k32f value. More...
kStatus | kSerializer_Write32fArray (kSerializer serializer, const k32f *data, kSize count)
| Writes a k32f array. More...
kStatus | kSerializer_Write32s (kSerializer serializer, k32s data)
| Writes a k32s value. More...
kStatus | kSerializer_Write32sArray (kSerializer serializer, const k32s *data, kSize count)
| Writes a k32s array. More...
kStatus | kSerializer_Write32u (kSerializer serializer, k32u data)
| Writes a k32u value. More...
kStatus | kSerializer_Write32uArray (kSerializer serializer, const k32u *data, kSize count)
| Writes a k32u array. More...
kStatus | kSerializer_Write64f (kSerializer serializer, k64f data)
| Writes a k64f value. More...
kStatus | kSerializer_Write64fArray (kSerializer serializer, const k64f *data, kSize count)
| Writes a k64f array. More...
kStatus | kSerializer_Write64s (kSerializer serializer, k64s data)
| Writes a k64s value. More...
kStatus | kSerializer_Write64sArray (kSerializer serializer, const k64s *data, kSize count)
| Writes a k64s array. More...
kStatus | kSerializer_Write64u (kSerializer serializer, k64u data)
| Writes a k64u value. More...
kStatus | kSerializer_Write64uArray (kSerializer serializer, const k64u *data, kSize count)
| Writes a k64u array. More...
kStatus | kSerializer_Write8s (kSerializer serializer, k8s data)
| Writes a k8s value. More...
kStatus | kSerializer_Write8sArray (kSerializer serializer, const k8s *data, kSize count)
| Writes a k8s array. More...
kStatus | kSerializer_Write8u (kSerializer serializer, k8u data)
| Writes a k8u value. More...
kStatus | kSerializer_Write8uArray (kSerializer serializer, const k8u *data, kSize count)
| Writes a k8u array. More...
kStatus | kSerializer_WriteByte (kSerializer serializer, kByte data)
| Writes a kByte value. More...
kStatus | kSerializer_WriteByteArray (kSerializer serializer, const kByte *data, kSize count)
| Writes a kByte array. More...
kStatus | kSerializer_WriteChar (kSerializer serializer, kChar data)
| Writes a kChar value. More...
kStatus | kSerializer_WriteCharArray (kSerializer serializer, const kChar *data, kSize count)
| Writes a kChar array. More...
kStatus | kSerializer_WriteItems (kSerializer serializer, kType type, kTypeVersion version, const void *items, kSize count)
| Writes an array of values or objects. More...
kStatus | kSerializer_WriteObject (kSerializer serializer, kObject object)
| Writes an object to the underlying stream. More...
kStatus | kSerializer_WriteSize (kSerializer serializer, kSize data)
| Writes a kSize value. More...
kStatus | kSerializer_WriteSizeArray (kSerializer serializer, const kSize *data, kSize count)
| Writes a kSize array. More...
kStatus | kSerializer_WriteSSize (kSerializer serializer, kSSize data)
| Writes a kSSize value. More...
kStatus | kSerializer_WriteSSizeArray (kSerializer serializer, const kSSize *data, kSize count)
| Writes a kSSize array. More...
kStatus | kSerializer_WriteText (kSerializer serializer, const kChar *data)
| Writes a null-terminated kChar array. More...
kStatus | kSerializer_WriteType (kSerializer serializer, kType type, kTypeVersion *version)
| Writes a type code. More...

## Member Function Documentation

kStatus kDat5Serializer_Construct | ( | kDat5Serializer * | serializer,
|  | kStream | stream,
|  | kAlloc | allocator
| ) |  |

Constructs a kDat5Serializer object.

Parameters

  serializer | Receives the constructed object.
  stream | Stream for reading or writing.
  allocator | Memory allocator (or kNULL for default).

Returns
  Operation status.

kAlloc kObject_Alloc | ( | kObject | object | ) |
| inherited

Gets the memory allocator associated with this object.

Most objects are constructed with an allocator, which is used to allocate the memory required by the object. Objects retain a reference to this allocator to enable further allocations and to free memory when the object is destroyed.

Parameters

  object | Object.

Returns
  Memory allocator.

See also
  kAlloc, kObject_Alloc_

kStatus kObject_Clone | ( | kObject * | object,
|  | kObject | source,
|  | kAlloc | allocator
| ) |  |
| inherited

Constructs a new object by copying an existing object, including any aggregated child elements.

If the source object is an object collection (e.g. kArrayList<kString>), any aggregated child objects are also cloned. In this case, the kObject_Dispose method can be used to free the cloned collection and its associated elements.

This method will fail if the source object (or an aggregated child element) does not support cloning.

Parameters

  object | Receives the constructed object.
  source | Source object.
  allocator | Memory allocator (or kNULL for default).

Returns
  Operation status.

See also
  kObject_Dispose

kStatus kObject_Destroy | ( | kObject | object | ) |
| inherited

Destroys the object.

The kObject_Destroy method destroys the object itself and any resources that are owned by the object. See Object Destruction for more information.

When an object is destroyed (or disposed), its reference count is decremented. The object is only truly destroyed when the reference count reaches zero. See Reference Counting for more information.

Parameters

  object | Object (or kNULL).

Returns
  Operation status.

See also
  Object Destruction, Reference Counting

kStatus kObject_Dispose | ( | kObject | object | ) |
| inherited

Destroys the object and any aggregated child elements.

The kObject_Dispose method destroys the object itself, any resources that are owned by the object, and if the object represents a collection of objects, any child objects in the collection. See Object Destruction for more information.

When an object is destroyed (or disposed), its reference count is decremented. The object is only truly destroyed when the reference count reaches zero. See Reference Counting for more information.

Parameters

  object | Object (or kNULL).

Returns
  Operation status.

See also
  Object Destruction, Reference Counting

kBool kObject_Equals | ( | kObject | object,
|  | kObject | other
| ) |  |
| inherited

Determines whether the object is equal to another object.

By default, objects are compared by reference; objects are considered equal if the given handles refer to the same object instance. However, some classes override the Equals method to provide a more meaningful comparison (e.g. kString).

Parameters

  object | Object.
  other | Object for comparison.

Returns
  kTRUE if the objects are equal.

kSize kObject_HashCode | ( | kObject | object | ) |
| inherited

Gets a hash code representing the state of this object.

By default, objects return a hash code based on the object handle value. However, some classes override the HashCode method to provide a more useful hash (e.g. kString).

Parameters

  object | Object.

Returns
  Hash code.

kBool kObject_Is | ( | kObject | object,
|  | kType | type
| ) |  |
| inherited

Determines whether this object is an instance of the specified type.

This function compares the type of this object with the given type. An object is considered to be an instance of a given type if a) the type represents a class and this object inherits from (or instantiates) that class, or b) the type represents an interface and this object implements the interface.

Parameters

  object | Object.
  type | Type.

Returns
  kTRUE if the object is of the specified type; otherwise kFALSE.

See also
  kObject_Is_, kType_Is

kBool kObject_IsShared | ( | kObject | object | ) |
| inherited

Reports whether the object is currently shared (reference count greater than one).

Objects are initialized with a reference count of one. The kObject_Share method can be used to increment the reference count. The kObject_Destroy and kObject_Dispose methods decrease the reference count, and when the reference count reaches zero, the object is actually destroyed/disposed.

This method can be used to determine if the reference count of an object is currently greater than one.

This method is thread-safe.

Parameters

  object | Object.

Returns
  kTRUE if the object is shared; kFALSE otherwise.

See also
  Reference Counting, kObject_Share

kStatus kObject_SetPool | ( | kObject | object,
|  | kObjectPool | pool
| ) |  |
| inherited

Sets the object pool associated with this object.

Object pools can be used to implement custom lifecycle management. If an object has an assigned pool, then the kObjectPool_Reclaim method will be called just prior to destruction, to provide an opportunity for the object to be reclaimed.

Parameters

  object | Object.
  pool | Pool object (or kNULL to clear the pool assignment).

Returns
  Operation status.

kStatus kObject_Share | ( | kObject | object | ) |
| inherited

Increments the reference count associated with this object.

This method is thread-safe.

Parameters

  object | Object.

Returns
  Operation status.

See also
  reference-counting

kSize kObject_Size | ( | kObject | object | ) |
| inherited

Estimates the memory consumed by this object, including any aggregated child elements.

This method can be optionally overridden by kObject-derived classes to report the amount of memory consumed by an object. The default implementation reports only the size of the class instance (additional allocations performed by the class are excluded).

Parameters

  object | Object.

Returns
  Object size, in bytes.

kType kObject_Type | ( | kObject | object | ) |
| inherited

Returns the type of the object.

Each object is an instance of a specific class type. The type handle returned by this function can be used to learn about the class.

Parameters

  object | Object.

Returns
  Type.

See also
  kType, kObject_Type_

kStatus kSerializer_AdvanceRead | ( | kSerializer | serializer,
|  | kSize | offset
| ) |  |
| inherited

Reads and discards a specified number of bytes.

Parameters

  serializer | Serializer object.
  offset | Number of bytes to read and discard.

Returns
  Operation status.

kStatus kSerializer_BeginRead | ( | kSerializer | serializer,
|  | kType | sizeType,
|  | kBool | includeSize
| ) |  |
| inherited

Begins reading a measured data section.

Parameters

  serializer | Serializer object.
  sizeType | Type of size field (k8u, k16u, k32u, or k64u)
  includeSize | Size of the size field was included in the recorded size?

Returns
  Operation status.

kStatus kSerializer_BeginWrite | ( | kSerializer | serializer,
|  | kType | sizeType,
|  | kBool | includeSize
| ) |  |
| inherited

Begins writing a measured section of data, using an 8, 16, 32, or 64-bit integer to record the size.

Parameters

  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?

Returns
  Operation status.

kStatus kSerializer_Construct | ( | kSerializer * | serializer,
|  | kStream | stream,
|  | kType | serializerType,
|  | kAlloc | allocator
| ) |  |
| inherited

Constructs a serializer object using the specified serialization format.

This method is a factory constructor; the type of serializer to be instantiated is provided as an argument. If no serializer type is provided, the default serializer will be used (currently kSerializer).

Parameters

  serializer | Serializer object.
  stream | Stream for reading/writing.
  serializerType | Serializer type (or kNULL for default).
  allocator | Memory allocator (or kNULL for default).

Returns
  Operation status.

kStatus kSerializer_EndRead | ( | kSerializer | serializer | ) |
| inherited

Ends reading a measured data section.

Parameters

  serializer | Serializer object.

Returns
  Operation status.

kStatus kSerializer_EndWrite | ( | kSerializer | serializer | ) |
| inherited

Ends writing a measured data section.

Parameters

  serializer | Serializer object.

Returns
  Operation status.

kStatus kSerializer_Flush | ( | kSerializer | serializer | ) |
| inherited

Flushes the serializer write buffer to the underlying stream.

Parameters

  serializer | Serializer object.

Returns
  Operation status.

kStatus kSerializer_LoadObject | ( | kObject * | object,
|  | kType | serializerType,
|  | const kChar * | filePath,
|  | kAlloc | readAlloc
| ) |  |
| inherited

Loads an object from file using the specified serializer type.

Parameters

  object | Receives deserialized object.
  serializerType | Type of serializer to use (e.g. kDat6Serializer).
  filePath | Path of the file to load.
  readAlloc | Memory allocator to use for loaded object (or kNULL for default).

Returns
  Operation status.

kStatus kSerializer_Read16s | ( | kSerializer | serializer,
|  | k16s * | data
| ) |  |
| inherited

Reads a k16s value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read16sArray | ( | kSerializer | serializer,
|  | k16s * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k16s array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read16u | ( | kSerializer | serializer,
|  | k16u * | data
| ) |  |
| inherited

Reads a k16u value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read16uArray | ( | kSerializer | serializer,
|  | k16u * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k16u array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read32f | ( | kSerializer | serializer,
|  | k32f * | data
| ) |  |
| inherited

Reads a k32f value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read32fArray | ( | kSerializer | serializer,
|  | k32f * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k32f array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read32s | ( | kSerializer | serializer,
|  | k32s * | data
| ) |  |
| inherited

Reads a k32s value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read32sArray | ( | kSerializer | serializer,
|  | k32s * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k32s array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read32u | ( | kSerializer | serializer,
|  | k32u * | data
| ) |  |
| inherited

Reads a k32u value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read32uArray | ( | kSerializer | serializer,
|  | k32u * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k32u array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read64f | ( | kSerializer | serializer,
|  | k64f * | data
| ) |  |
| inherited

Reads a k64f value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read64fArray | ( | kSerializer | serializer,
|  | k64f * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k64f array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read64s | ( | kSerializer | serializer,
|  | k64s * | data
| ) |  |
| inherited

Reads a k64s value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read64sArray | ( | kSerializer | serializer,
|  | k64s * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k64s array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read64u | ( | kSerializer | serializer,
|  | k64u * | data
| ) |  |
| inherited

Reads a k64u value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read64uArray | ( | kSerializer | serializer,
|  | k64u * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k64u array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read8s | ( | kSerializer | serializer,
|  | k8s * | data
| ) |  |
| inherited

Reads a k8s value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read8sArray | ( | kSerializer | serializer,
|  | k8s * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k8s array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_Read8u | ( | kSerializer | serializer,
|  | k8u * | data
| ) |  |
| inherited

Reads a k8u value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_Read8uArray | ( | kSerializer | serializer,
|  | k8u * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a k8u array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_ReadByte | ( | kSerializer | serializer,
|  | kByte * | data
| ) |  |
| inherited

Reads a kByte value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_ReadByteArray | ( | kSerializer | serializer,
|  | kByte * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a kByte array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_ReadChar | ( | kSerializer | serializer,
|  | kChar * | data
| ) |  |
| inherited

Reads a kChar value.

Parameters

  serializer | Serializer object.
  data | Receives the value.

Returns
  Operation status.

kStatus kSerializer_ReadCharArray | ( | kSerializer | serializer,
|  | kChar * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a kChar array.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kBool kSerializer_ReadCompleted | ( | kSerializer | serializer | ) |
| inherited

Determines whether the current measured read section has more bytes.

Parameters

  serializer | Serializer object.

Returns
  kTRUE if no more bytes available; otherwise, kFALSE.

kStatus kSerializer_ReadItems | ( | kSerializer | serializer,
|  | kType | type,
|  | kTypeVersion | version,
|  | void * | items,
|  | kSize | count
| ) |  |
| inherited

Reads an array of values or objects.

Parameters

  serializer | Serializer object.
  type | Type of items.
  version | Type version.
  items | Receives deserialized items.
  count | Count of items.

Returns
  Operation status.

kStatus kSerializer_ReadObject | ( | kSerializer | serializer,
|  | kObject * | object,
|  | kAlloc | allocator
| ) |  |
| inherited

Reads an object from the underlying stream.

Parameters

  serializer | Serializer object.
  object | Receives deserialized object.
  allocator | Memory allocator (or kNULL for default).

Returns
  Operation status.

kStatus kSerializer_ReadSize | ( | kSerializer | serializer,
|  | kSize * | data
| ) |  |
| inherited

Reads a kSize value.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to read the size value.

Parameters

  serializer | Serializer object.
  data | Receives size value.

Returns
  Operation status.

kStatus kSerializer_ReadSizeArray | ( | kSerializer | serializer,
|  | kSize * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a kSize array.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to read the size values.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_ReadSSize | ( | kSerializer | serializer,
|  | kSSize * | data
| ) |  |
| inherited

Reads a kSSize value.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to read the size value.

Parameters

  serializer | Serializer object.
  data | Receives size value.

Returns
  Operation status.

kStatus kSerializer_ReadSSizeArray | ( | kSerializer | serializer,
|  | kSSize * | data,
|  | kSize | count
| ) |  |
| inherited

Reads a kSSize array.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to read the size values.

Parameters

  serializer | Serializer object.
  data | Receives the array elements.
  count | Count of array elements to read.

Returns
  Operation status.

kStatus kSerializer_ReadText | ( | kSerializer | serializer,
|  | kChar * | data,
|  | kSize | capacity
| ) |  |
| inherited

Reads a null-terminated kChar array.

Parameters

  serializer | Serializer object.
  data | Receives the string.
  capacity | Capacity of data string (including null terminator; must be greater than zero).

Returns
  Operation status.

kStatus kSerializer_ReadType | ( | kSerializer | serializer,
|  | kType * | type,
|  | kTypeVersion * | version
| ) |  |
| inherited

Reads a type code.

Parameters

  serializer | Serializer object.
  type | Type instance.
  version | Receives a reference to the type version that was read.

Returns
  Operation status.

kStatus kSerializer_Reset | ( | kSerializer | serializer | ) |
| inherited

Discards any streaming context accumulated by the serializer.

Parameters

  serializer | Serializer object.

Returns
  Operation status.

kStatus kSerializer_SaveObject | ( | kObject | object,
|  | kType | serializerType,
|  | const kChar * | filePath
| ) |  |
| inherited

Saves an object to file using the specified serializer type.

Parameters

  object | Object to be serialized.
  serializerType | Type of serializer to use (e.g. kDat6Serializer).
  filePath | Path of the file to save.

Returns
  Operation status.

kStatus kSerializer_SetSizeEncoding | ( | kSerializer | serializer,
|  | k32u | byteCount
| ) |  |
| inherited

Explicitly sets the number of bytes used to encode/decode kSize and kSSize values.

The default size encoding for kSerializer is 4 bytes. However this value can be overridden by derived classes.

Parameters

  serializer | Serializer object.
  byteCount | Number of bytes to use when encoding size values (accepts 4 or 8).

Returns
  Operation status.

kStatus kSerializer_SetVersion | ( | kSerializer | serializer,
|  | kAssembly | assembly,
|  | kVersion | version
| ) |  |
| inherited

Sets the version to use when serializing types.

Some serialization formats use a versioning scheme in which a separate version is given for each assembly, while others use a single version that is applied to types from all assemblies. If a single version is used for assemblies, set the assembly argument to null.

Parameters

  serializer | Serializer object.
  assembly | Assembly object (or kNULL).
  version | Desired version.

Returns
  Operation status.

kStream kSerializer_Stream | ( | kSerializer | serializer | ) |
| inherited

Gets the underlying stream.

Parameters

  serializer | Serializer object.

Returns
  Stream object.

kStatus kSerializer_Write16s | ( | kSerializer | serializer,
|  | k16s | data
| ) |  |
| inherited

Writes a k16s value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write16sArray | ( | kSerializer | serializer,
|  | const k16s * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k16s array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write16u | ( | kSerializer | serializer,
|  | k16u | data
| ) |  |
| inherited

Writes a k16u value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write16uArray | ( | kSerializer | serializer,
|  | const k16u * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k16u array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write32f | ( | kSerializer | serializer,
|  | k32f | data
| ) |  |
| inherited

Writes a k32f value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write32fArray | ( | kSerializer | serializer,
|  | const k32f * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k32f array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write32s | ( | kSerializer | serializer,
|  | k32s | data
| ) |  |
| inherited

Writes a k32s value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write32sArray | ( | kSerializer | serializer,
|  | const k32s * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k32s array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write32u | ( | kSerializer | serializer,
|  | k32u | data
| ) |  |
| inherited

Writes a k32u value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write32uArray | ( | kSerializer | serializer,
|  | const k32u * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k32u array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write64f | ( | kSerializer | serializer,
|  | k64f | data
| ) |  |
| inherited

Writes a k64f value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write64fArray | ( | kSerializer | serializer,
|  | const k64f * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k64f array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write64s | ( | kSerializer | serializer,
|  | k64s | data
| ) |  |
| inherited

Writes a k64s value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write64sArray | ( | kSerializer | serializer,
|  | const k64s * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k64s array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write64u | ( | kSerializer | serializer,
|  | k64u | data
| ) |  |
| inherited

Writes a k64u value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write64uArray | ( | kSerializer | serializer,
|  | const k64u * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k64u array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write8s | ( | kSerializer | serializer,
|  | k8s | data
| ) |  |
| inherited

Writes a k8s value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write8sArray | ( | kSerializer | serializer,
|  | const k8s * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k8s array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_Write8u | ( | kSerializer | serializer,
|  | k8u | data
| ) |  |
| inherited

Writes a k8u value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_Write8uArray | ( | kSerializer | serializer,
|  | const k8u * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a k8u array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_WriteByte | ( | kSerializer | serializer,
|  | kByte | data
| ) |  |
| inherited

Writes a kByte value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_WriteByteArray | ( | kSerializer | serializer,
|  | const kByte * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a kByte array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_WriteChar | ( | kSerializer | serializer,
|  | kChar | data
| ) |  |
| inherited

Writes a kChar value.

Parameters

  serializer | Serializer object.
  data | Value to write.

Returns
  Operation status.

kStatus kSerializer_WriteCharArray | ( | kSerializer | serializer,
|  | const kChar * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a kChar array.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_WriteItems | ( | kSerializer | serializer,
|  | kType | type,
|  | kTypeVersion | version,
|  | const void * | items,
|  | kSize | count
| ) |  |
| inherited

Writes an array of values or objects.

Parameters

  serializer | Serializer object.
  type | Type of items.
  version | Type version.
  items | Items to serialize.
  count | Count of items.

Returns
  Operation status.

kStatus kSerializer_WriteObject | ( | kSerializer | serializer,
|  | kObject | object
| ) |  |
| inherited

Writes an object to the underlying stream.

Parameters

  serializer | Serializer object.
  object | Object to be serialized.

Returns
  Operation status.

kStatus kSerializer_WriteSize | ( | kSerializer | serializer,
|  | kSize | data
| ) |  |
| inherited

Writes a kSize value.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to write the size value.

Parameters

  serializer | Serializer object.
  data | Size value.

Returns
  Operation status.

kStatus kSerializer_WriteSizeArray | ( | kSerializer | serializer,
|  | const kSize * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a kSize array.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to write the size values.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_WriteSSize | ( | kSerializer | serializer,
|  | kSSize | data
| ) |  |
| inherited

Writes a kSSize value.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to write the size value.

Parameters

  serializer | Serializer object.
  data | SSize value.

Returns
  Operation status.

kStatus kSerializer_WriteSSizeArray | ( | kSerializer | serializer,
|  | const kSSize * | data,
|  | kSize | count
| ) |  |
| inherited

Writes a kSSize array.

This method uses the current size encoding (specified with kSerializer_SetSizeEncoding) to write the size values.

Parameters

  serializer | Serializer object.
  data | Array to write.
  count | Count of array elements.

Returns
  Operation status.

kStatus kSerializer_WriteText | ( | kSerializer | serializer,
|  | const kChar * | data
| ) |  |
| inherited

Writes a null-terminated kChar array.

Parameters

  serializer | Serializer object.
  data | String to write.

Returns
  Operation status.

kStatus kSerializer_WriteType | ( | kSerializer | serializer,
|  | kType | type,
|  | kTypeVersion * | version
| ) |  |
| inherited

Writes a type code.

Parameters

  serializer | Serializer object.
  type | Type instance.
  version | Receives a reference to the type version that was written.

Returns
  Operation status.

The documentation for this class was generated from the following file:

- Io/kDat5Serializer.h