Contents

decodeValue(ofObjCType:at:size:)

Decodes a single value of a known type from the specified data buffer.

Declaration

func decodeValue(ofObjCType type: UnsafePointer<CChar>, at data: UnsafeMutableRawPointer, size: Int)

Parameters

  • type:

    The Objective-C type to decode.

  • data:

    The data buffer to decode from.

  • size:

    The size of the data buffer.

Discussion

The type parameter must contain exactly one type code, and the buffer specified by data must be large enough to hold the value corresponding to that type code. For information on creating an Objective-C type code suitable for type, see Type Encodings.

Subclasses must override this method and provide an implementation to decode the value. In your overriding implementation, decode the value into the buffer beginning at data.

This method matches an encodeValue(ofObjCType:at:) message used during encoding.

See Also

Decoding General Data