mccallum@gnu.ai.mit.edu
)fedor@boulder.colorado.edu
)Version: 1.41
Date: 2004/06/22 22:40:36
Copyright: (C) 1995, 1996 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSCoder.h
Standards:
- MacOS-X
- OpenStep
- GNUstep
Top-level class defining methods for use when archiving (encoding) objects to a byte array or file, and when restoring (decoding) objects. Generally only subclasses of this class are used directly - NSArchiver , NSUnarchiver , NSKeyedArchiver , NSKeyedUnarchiver , or NSPortCoder .
NSPortCoder
is used within the distributed objects framework. For archiving to/from disk, the Keyed... classes are preferred for new implementations, since they provide greater forward/backward compatibility in the face of class changes.
Method summary
Returns a flag indicating whether the receiver
supported keyed coding. the default
implementation returns NO
.
Subclasses supporting keyed coding must override
this to return YES
.
Returns a class indicating whether an encoded value corresponding to aKey exists.
Decodes array of count structures or
objects of given type, which may be
obtained through the ' @encode(...)
'
compile-time operator. Usually this is used
for primitives though it can be used for objects as
well. Objects will be retained and you must release
them.
Returns a boolean value associated with aKey. This value must previously have been encoded using -encodeBool:forKey:
Returns a pointer to a byte array associated with
aKey.
Returns the length of the
data in aLength.
This value must previously
have been encoded using
-encodeBytes:length:forKey:
Retrieve bytes directly from archive.
Decode an instance of NSData .
Returns a double value associated with aKey. This value must previously have been encoded using -encodeDouble:forKey: or -encodeFloat:forKey:
Returns a float value associated with
aKey. This value must previously have been
encoded using
-encodeFloat:forKey:
or
-encodeDouble:forKey:
Precision may be lost (or an exception raised
if the value will not fit in a float) if the value was
encoded using
-encodeDouble:forKey:
,
Returns a 32-bit integer value associated with
aKey. This value must previously have been
encoded using
-encodeInt:forKey:
,
-encodeInt32:forKey:
, or
-encodeInt64:forKey:
.
An exception will be raised if the value does
not fit in a 32-bit integer.
Returns a 64-bit integer value associated with aKey. This value must previously have been encoded using -encodeInt:forKey: , -encodeInt32:forKey: , or -encodeInt64:forKey: .
Returns an integer value associated with
aKey. This value must previously have been
encoded using
-encodeInt:forKey:
,
-encodeInt32:forKey:
, or
-encodeInt64:forKey:
.
An exception will be raised if the value does
not fit in an integer.
Decodes a generic object. Usually the class will be
read from the archive, an object will be created
through an alloc
call, then that class
will be sent an
[<NSCoding>-initWithCoder:]
message.
Returns an object value associated with aKey. This value must previously have been encoded using -encodeObject:forKey: or -encodeConditionalObject:forKey:
Decodes a point structure.
Decodes a property list from the archive previously stored through a call to -encodePropertyList: .
Decodes a rectangle structure.
Decodes a size structure.
Decodes structure or object of given
type, which may be obtained through the '
@encode(...)
' compile-time operator.
Usually this is used for primitives though it can
be used for objects as well, in which case you are
responsible for releasing them.
Multiple version of -decodeValueOfObjCType:at: .
Encodes array of count
structures or objects of given type,
which may be obtained through the '
@encode(...)
' compile-time operator.
Usually this is used for primitives though it can
be used for objects as well.
Encodes aBool and associates the encoded value with aKey.
Can be ignored.
Can be ignored.
Stores bytes directly into archive.
Encodes the data of the specified length and pointed to by aPointer, and associates the encoded value with aKey.
Encode object if it is/will be encoded
unconditionally by this coder, otherwise
store a nil
.
Encodes anObject and associates the encoded value with aKey, but only if anObject has already been encoded using -encodeObject:forKey:
Encode an instance of NSData .
Encodes aDouble and associates the encoded value with aKey.
Encodes aFloat and associates the encoded value with aKey.
Encodes anInteger and associates the encoded value with aKey.
Encodes anInteger and associates the encoded value with aKey.
Encodes anInteger and associates the encoded value with aKey.
Encodes a generic object. This will usually result in an [<NSCoding>-encodeWithCoder:] message being sent to anObject so it can encode itself.
Encodes anObject and associates the encoded value with aKey.
Encodes a point structure.
Encodes a property list by calling [NSSerializer -serializePropertyList:], then encoding the resulting NSData object.
Encodes a rectangle structure.
Store object and objects it refers to in archive (i.e., complete object graph).
Encodes a size structure.
Encodes structure or object of given
type, which may be obtained through the '
@encode(...)
' compile-time operator.
Usually this is used for primitives though it can
be used for objects as well.
Multiple version of -encodeValueOfObjCType:at: .
Returns zone being used to allocate memory for decoded objects.
Sets zone to use for allocating memory for decoded objects.
Returns *Step version, which is not the release version, but a large number, by specification <1000 for pre-OpenStep. This implementation returns a number based on the GNUstep major, minor, and subminor versions.
Returns current version of class (when encoding) or version of decoded class (decoded). Version comes from [NSObject -getVersion].
- Declared in:
- Foundation/NSCoder.h
Standards:
- NotOpenStep
- NotMacOS-X
- GNUstep
GNUstep extensions to NSCoder , supporting compatibility with libObjects.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.