DekGenius.com
[ Team LiB ] Previous Section Next Section

NSKeyedUnarchiver Mac OS X 10.2

This concrete subclass of NSCoder provides a means to decode objects that have been encoded in a keyed archive. The companion class NSKeyedArchiver provides the means to create such keyed archives from a set of objects. Archiving is described in greater detail in Chapter 2.

figs/cocn_1347.gif

@interface NSKeyedUnarchiver : NSCoder
 // Initializers
   - (id)initForReadingWithData:(NSData *)data;
 // Accessor Methods
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
   - (void)setClass:(Class)cls forClassName:(NSString *)codedName;
 // Class Methods
   + (Class)classForClassName:(NSString *)codedName;
   + (void)setClass:(Class)cls forClassName:(NSString *)codedName;
   + (id)unarchiveObjectWithData:(NSData *)data;
   + (id)unarchiveObjectWithFile:(NSString *)path;
 // Instance Methods
   - (int32_t)decodeInt32ForKey:(NSString *)key;
   - (const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(unsigned *)lengthp;
   - (double)decodeDoubleForKey:(NSString *)key;
   - (Class)classForClassName:(NSString *)codedName;
   - (BOOL)containsValueForKey:(NSString *)key;
   - (BOOL)decodeBoolForKey:(NSString *)key;
   - (float)decodeFloatForKey:(NSString *)key;
   - (int64_t)decodeInt64ForKey:(NSString *)key;
   - (int)decodeIntForKey:(NSString *)key;
   - (id)decodeObjectForKey:(NSString *)key;
   - (void)finishDecoding;
// Methods Implemented by the Delegate
   - (Class)unarchiver:(NSKeyedUnarchiver *)unarchiver cannotDecodeObjectOfClassName:(NSString *)name
        originalClasses:(NSArray *)classNames;
   - (id)unarchiver:(NSKeyedUnarchiver *)unarchiver didDecodeObject:(id)object;
   - (void)unarchiver:(NSKeyedUnarchiver *)unarchiver willReplaceObject:(id)object withObject:(id)newObject;
   - (void)unarchiverDidFinish:(NSKeyedUnarchiver *)unarchiver;
   - (void)unarchiverWillFinish:(NSKeyedUnarchiver *)unarchiver;

    [ Team LiB ] Previous Section Next Section