![]() |
API 0.9.5
|
Unarchives objects created using CPKeyedArchiver. More...
#import <CPKeyedUnarchiver.h>
Instance Methods | |
(BOOL) | - allowsKeyedCoding |
(Class) | - classForClassName: |
(BOOL) | - containsValueForKey: |
(BOOL) | - decodeBoolForKey: |
(id) | - decodeBytesForKey: |
(double) | - decodeDoubleForKey: |
(float) | - decodeFloatForKey: |
(int) | - decodeIntForKey: |
(id) | - decodeObjectForKey: |
(CGPoint) | - decodePointForKey: |
(CGRect) | - decodeRectForKey: |
(CGSize) | - decodeSizeForKey: |
(id) | - delegate |
(void) | - finishDecoding |
(id) | - initForReadingWithData: |
(void) | - setClass:forClassName: |
(void) | - setDelegate: |
Class Methods | |
(void) | + initialize |
(id) | + unarchiveObjectWithData: |
(id) | + unarchiveObjectWithFile: |
(id) | + unarchiveObjectWithFile:asynchronously: |
Unarchives objects created using CPKeyedArchiver.
CPKeyedUnarchiver is used for creating objects out of coded files or CPData objects that were created by CPKeyedArchiver. More specifically, this class unarchives objects from a data stream or file and brings them back into memory for programmatic usage.
-(Class)unarchiver:(CPKeyedUnarchiver)unarchiver cannotDecodeObjectOfClassName:(CPString)name originalClasses:(CPArray)classNames; Called when the specified class is not available during decoding. The delegate may load the class, or return a substitute class to use instead.
unarchiver | the unarchiver performing the decode |
name | the name of the class that can't be found |
an | array of class names describing the encoded object's class hierarchy. The first index is the encoded class name, and each superclass is after that. |
nil
to abort the unarchiving operation-(id)unarchiver:(CPKeyedUnarchiver)unarchiver didDecodeObject:(id)object; Called when the unarchiver decodes an object.
unarchiver | the unarchiver doing the decoding |
object | the decoded object |
nil
.-(void)unarchiver:(CPKeyedUnarchiver)unarchiver willReplaceObject:(id)object withObject:(id)newObject; Called when a decoded object has been substituted with another. (for example, from -unarchiver
:didDecodeObject:.
unarchiver | the unarchiver that decoded the object |
object | the original decoded object |
newObject | the replacement object |
-(void)unarchiverWillFinish:(CPKeyedUnarchiver)unarchiver; Called when the unarchiver is about to finish decoding.
unarchiver | the unarchiver that's about to finish |
-(void)unarchiverDidFinish:(CPKeyedUnarchiver)unarchiver; Called when the unarchiver has finished decoding.
unarchiver | the unarchiver that finished decoding |
Definition at line 2 of file CPKeyedUnarchiver.h.
- (BOOL) allowsKeyedCoding |
Returns a flag indicating whether the receiver supports keyed coding. The default implementation returns NO
. Subclasses supporting keyed coding must override this to return YES
.
Reimplemented from CPCoder.
Definition at line 423 of file CPKeyedUnarchiver.j.
- (Class) classForClassName: | (CPString) | aClassName |
Definition at line 418 of file CPKeyedUnarchiver.j.
- (BOOL) containsValueForKey: | (CPString) | aKey |
Definition at line 197 of file CPKeyedUnarchiver.j.
- (BOOL) decodeBoolForKey: | (CPString) | aKey |
Definition at line 233 of file CPKeyedUnarchiver.j.
- (id) decodeBytesForKey: | (CPString) | aKey |
Definition at line 351 of file CPKeyedUnarchiver.j.
- (double) decodeDoubleForKey: | (CPString) | aKey |
Definition at line 253 of file CPKeyedUnarchiver.j.
- (float) decodeFloatForKey: | (CPString) | aKey |
Definition at line 243 of file CPKeyedUnarchiver.j.
- (int) decodeIntForKey: | (CPString) | aKey |
Definition at line 263 of file CPKeyedUnarchiver.j.
- (id) decodeObjectForKey: | (CPString) | aKey |
Definition at line 318 of file CPKeyedUnarchiver.j.
- (CGPoint) decodePointForKey: | (CPString) | aKey |
Definition at line 273 of file CPKeyedUnarchiver.j.
- (CGRect) decodeRectForKey: | (CPString) | aKey |
Definition at line 288 of file CPKeyedUnarchiver.j.
- (CGSize) decodeSizeForKey: | (CPString) | aKey |
Definition at line 303 of file CPKeyedUnarchiver.j.
- (id) delegate |
Definition at line 381 of file CPKeyedUnarchiver.j.
- (void) finishDecoding |
Definition at line 369 of file CPKeyedUnarchiver.j.
- (id) initForReadingWithData: | (CPData) | data |
Definition at line 140 of file CPKeyedUnarchiver.j.
+ (void) initialize |
Definition at line 120 of file CPKeyedUnarchiver.j.
- (void) setClass: | (Class) | aClass | |
forClassName: | (CPString) | aClassName | |
Definition at line 413 of file CPKeyedUnarchiver.j.
- (void) setDelegate: | (id) | aDelegate |
Definition at line 390 of file CPKeyedUnarchiver.j.
+ (id) unarchiveObjectWithData: | (CPData) | aData |
Definition at line 163 of file CPKeyedUnarchiver.j.
+ (id) unarchiveObjectWithFile: | (CPString) | aFilePath |
Definition at line 182 of file CPKeyedUnarchiver.j.
+ (id) unarchiveObjectWithFile: | (CPString) | aFilePath | |
asynchronously: | (BOOL) | aFlag | |
Definition at line 189 of file CPKeyedUnarchiver.j.