Instance Method

decodeArrayOfObjCType:count:at:

Decodes an array of count items, whose Objective-C type is given by itemType.

Declaration

- (void)decodeArrayOfObjCType:(const char *)itemType count:(NSUInteger)count at:(void *)array;

Discussion

The items are decoded into the buffer beginning at address, which must be large enough to contain them all. itemType must contain exactly one type code. NSCoder’s implementation invokes decodeValueOfObjCType:at: to decode the entire array of items.

This method matches an encodeArrayOfObjCType:count:at: message used during encoding.

For information on creating an Objective-C type code suitable for itemType, see Type Encodings.

Special Considerations

You should not use this method to decode C arrays of Objective-C objects. For historical reasons, returned objects will have an additional ownership reference which you can only relinquish using CFRelease.

See Also

Decoding General Data

- decodeBoolForKey:

Decodes and returns a boolean value that was previously encoded with encodeBool:forKey: and associated with the string key.

- decodeBytesForKey:returnedLength:

Decodes a buffer of data that was previously encoded with encodeBytes:length:forKey: and associated with the string key.

- decodeBytesWithReturnedLength:

Decodes a buffer of data whose types are unspecified.

- decodeDataObject

Decodes and returns an NSData object that was previously encoded with encodeDataObject:. Subclasses must override this method.

- decodeDoubleForKey:

Decodes and returns a double value that was previously encoded with either encodeFloat:forKey: or encodeDouble:forKey: and associated with the string key.

- decodeFloatForKey:

Decodes and returns a float value that was previously encoded with encodeFloat:forKey: or encodeDouble:forKey: and associated with the string key.

- decodeIntForKey:

Decodes and returns an int value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeIntegerForKey:

Decodes and returns an NSInteger value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeInt32ForKey:

Decodes and returns a 32-bit integer value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeInt64ForKey:

Decodes and returns a 64-bit integer value that was previously encoded with encodeInt:forKey:, encodeInteger:forKey:, encodeInt32:forKey:, or encodeInt64:forKey: and associated with the string key.

- decodeNXObject

Decodes an object previously written with encodeNXObject:.

Deprecated
- decodeObject

Decodes and returns an object that was previously encoded with any of the encode…Object methods.

- decodeObjectForKey:

Decodes and returns a previously-encoded object that was previously encoded with encodeObject:forKey: or encodeConditionalObject:forKey: and associated with the string key.

- decodePoint

Decodes and returns an NSPoint structure that was previously encoded with encodePoint:.

- decodePointForKey:

Decodes and returns an NSPoint structure that was previously encoded with encodePoint:forKey:.

- decodePropertyList

Decodes a property list that was previously encoded with encodePropertyList:.

- decodeRect

Decodes and returns an NSRect structure that was previously encoded with encodeRect:.

- decodeRectForKey:

Decodes and returns an NSRect structure that was previously encoded with encodeRect:forKey:.

- decodeSize

Decodes and returns an NSSize structure that was previously encoded with encodeSize:.

- decodeSizeForKey:

Decodes and returns an NSSize structure that was previously encoded with encodeSize:forKey:.

- decodeValueOfObjCType:at:

Decodes a single value, whose Objective-C type is given by valueType.

Deprecated
- decodeValueOfObjCType:at:size:

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

- decodeValuesOfObjCTypes:

Decodes a series of potentially different Objective-C types.

- decodeObjectOfClass:forKey:

Decodes an object for the key, restricted to the specified class.

- decodeObjectOfClasses:forKey:

Decodes an object for the key, restricted to the specified classes.

- decodePropertyListForKey:

Returns a decoded property list for the specified key.