DekGenius.com
[ Team LiB ] Previous Section Next Section

NSCoder Mac OS X 10.0

This class defines an abstract interface for subclasses that implement object archival functionality. The Foundation framework implements five concreate subclasses: NSArchiver and NSUnarchiver are used for non-keyed archiving, while NSKeyedArchiver and NSKeyedUnarchiver provide support for keyed-archiving. NSPortCoder is used by the distributed objects system to send object proxies across a connection. For more information, see the class references for these five classes, the protocol reference for the NSCoding protocol, and Chapter 2.

figs/cocn_1317.gif

@interface NSCoder : NSObject
 // Accessor Methods
   - (void)setObjectZone:(NSZone *)zone;
   - (NSZone *)objectZone;
 // Instance Methods
   - (BOOL)allowsKeyedCoding;
   - (void)decodeArrayOfObjCType:(const char *)itemType count:(unsigned)count at:(void *)array;
   - (BOOL)decodeBoolForKey:(NSString *)key;
   - (const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(unsigned *)lengthp;
   - (void *)decodeBytesWithReturnedLength:(unsigned *)lengthp;
   - (NSData *)decodeDataObject;
   - (double)decodeDoubleForKey:(NSString *)key;
   - (float)decodeFloatForKey:(NSString *)key;
   - (int32_t)decodeInt32ForKey:(NSString *)key;
   - (int64_t)decodeInt64ForKey:(NSString *)key;
   - (int)decodeIntForKey:(NSString *)key;
   - (NSColor *)decodeNXColor;
   - (id)decodeNXObject;
   - (id)decodeObject;
   - (id)decodeObjectForKey:(NSString *)key;
   - (NSPoint)decodePoint;
   - (NSPoint)decodePointForKey:(NSString *)key;
   - (id)decodePropertyList;
   - (NSRect)decodeRect;
   - (NSRect)decodeRectForKey:(NSString *)key;
   - (NSSize)decodeSize;
   - (NSSize)decodeSizeForKey:(NSString *)key;
   - (void)decodeValueOfObjCType:(const char *)type at:(void *)data;
   - (void)decodeValuesOfObjCTypes:(const char *)types, ...;
   - (void)encodeArrayOfObjCType:(const char *)type  count:(unsigned)count at:(const void *)array;
   - (void)encodeBool:(BOOL)boolv forKey:(NSString *)key;
   - (void)encodeBycopyObject:(id)anObject;
   - (void)encodeByrefObject:(id)anObject;
   - (void)encodeBytes:(const uint8_t *)bytesp length:(unsigned)lenv forKey:(NSString *)key;
   - (void)encodeBytes:(const void *)byteaddr length:(unsigned)length;
   - (void)encodeConditionalObject:(id)object;
   - (void)encodeConditionalObject:(id)objv forKey:(NSString *)key;
   - (void)encodeDataObject:(NSData *)data;
   - (void)encodeDouble:(double)realv forKey:(NSString *)key;
   - (void)encodeFloat:(float)realv forKey:(NSString *)key;
   - (void)encodeInt32:(int32_t)intv forKey:(NSString *)key;
   - (void)encodeInt64:(int64_t)intv forKey:(NSString *)key;
   - (void)encodeInt:(int)intv forKey:(NSString *)key;
   - (void)encodeNXObject:(id)object;
   - (void)encodeObject:(id)object;
   - (void)encodeObject:(id)objv forKey:(NSString *)key;
   - (void)encodePoint:(NSPoint)point;
   - (void)encodePoint:(NSPoint)point forKey:(NSString *)key;
   - (void)encodePropertyList:(id)aPropertyList;
   - (void)encodeRect:(NSRect)rect;
   - (void)encodeRect:(NSRect)rect forKey:(NSString *)key;
   - (void)encodeRootObject:(id)rootObject;
   - (void)encodeSize:(NSSize)size;
   - (void)encodeSize:(NSSize)size forKey:(NSString *)key;
   - (void)encodeValueOfObjCType:(const char *)type at:(const void *)addr;
   - (void)encodeValuesOfObjCTypes:(const char *)types, ...;
   - (BOOL)containsValueForKey:(NSString *)key;
   - (unsigned)systemVersion;
   - (unsigned)versionForClassName:(NSString *)className;

Subclasses

NSArchiver, NSKeyedArchiver, NSKeyedUnarchiver, NSPortCoder, NSUnarchiver

    [ Team LiB ] Previous Section Next Section