Up
Authors
- Manuel Guesdon (
mguesdon@orange-concept.com
)
-
Version: 25994
Date: 2008-01-22 14:57:07 +0100 (Die, 22 Jän 2008)
EOKeyValueArchiver object is used to archive a
tree of objects into a key/value propertyList.
EOKeyValueUnarchiver object is used to
unarchive from a propertyList a tree of objects
archived with a EOKeyValueArchiver. Example: //
Archiving: EOKeyValueArchiver*
archive=AUTORELEASE([EOKeyValueArchiver
new]); [archive setDelegate:MyArchivingDelegate];
[archiver encodeObject:anObject forKey:@"anObjectKey"];
[archiver encodeInt:125 forKey:@"aKey"];...
NSDictionary* archivePropertyList=[archiver
dictionary]; // Now unarchive archivePropertyList
EOKeyValueUnarchiver*
unarchiver=AUTORELEASE([[EOKeyValueUnarchiver
alloc]initWith:archivePropertyList]);
[archive setDelegate:MyUnarchivingDelegate];
id anObject=[unarchiver
decodeObjectForKey:@"anObjectKey"];
int anInt=[unarchiver
decodeIntForKey:@"anKey"]; [unarchiver
finishInitializationOfObjects];
[unarchiver awakeObjects]
Copyright: (C)
2000-2002,2003,2004,2005 Free Software
Foundation, Inc.
- Declared in:
- EOControl/EOKeyValueArchiver.h
Description forthcoming.
Instance Variables
Method summary
- (id)
delegate;
Returns receiver's delegate
- (NSDictionary*)
dictionary;
Returns archived object/tree as propertList
- (void)
encodeBool: (BOOL)yn
forKey: (NSString*)key;
Archives boolean 'yn' as 'key'
- (void)
encodeInt: (int)intValue
forKey: (NSString*)key;
Archives integer 'intValue' as 'key'
- (void)
encodeObject: (id)object
forKey: (NSString*)key;
Archives the object 'object' as 'key'.
'object' should be a NSString, a NSData, NSArray
or NSDictionary or conforms to EOKeyValueArchiving
protocol. Raise an exception otherwise.
- (void)
encodeReferenceToObject: (id)object
forKey: (NSString*)key;
- (void)
setDelegate: (id)delegate;
Set receiver's delegate
Instance Variables for EOKeyValueArchiver Class
@protected id _delegate;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableDictionary* _propertyList;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- EOControl/EOKeyValueArchiver.h
Description forthcoming.
Instance Variables
Method summary
- (id)
_dictionaryForPropertyList: (NSDictionary*)propList;
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (id)
_findTypeForPropertyListDecoding: (id)obj;
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (id)
_objectForPropertyList: (NSDictionary*)propList;
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (id)
_objectsForPropertyList: (NSArray*)propList;
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (void)
awakeObjects;
Finalize unarchiving by calling
awakeFromKeyValueUnarchiver:
on all unarchived objects
- (BOOL)
decodeBoolForKey: (NSString*)key;
Returns unarchived boolean which was archived as
'key'. NO
if no object is found
- (int)
decodeIntForKey: (NSString*)key;
Returns unarchived integer which was archived as
'key'. 0 if no object is found
- (id)
decodeObjectForKey: (NSString*)key;
Returns unarchived object for
key. The
object should be a NSString, NSData, NSArray or
NSDictionary or its class instances should
implements
-initWithKeyValueUnarchiver:
- (id)
decodeObjectReferenceForKey: (NSString*)key;
Returns unarchived object for the reference
archived as 'key'. The receiver gets the object
for reference by calling its delegate method
-unarchiver:objectForReference:
- (id)
delegate;
Returns receiver's delegate
- (void)
ensureObjectAwake: (id)object;
- (void)
finishInitializationOfObjects;
Finalize unarchiving by calling
finishInitializationWithKeyValueUnarchiver:
on all unarchived objects
- (id)
initWithDictionary: (NSDictionary*)dictionary;
Inits unarchiver with propertyList 'dictionary'
- (BOOL)
isThereValueForKey: (NSString*)key;
Returns YES
if there's a value for
key 'key'
- (id)
parent;
Returns the parent object for the currently
unarchiving object.
- (void)
setDelegate: (id)delegate;
Set the receiver's delegate
Instance Variables for EOKeyValueUnarchiver Class
@protected NSMutableArray* _allUnarchivedObjects;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSHashTable* _awakenedObjects;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _delegate;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _nextParent;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _parent;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSDictionary* _propertyList;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- EOControl/EOKeyValueArchiver.h
Description forthcoming.
Method summary
- (id)
archiver: (
EOKeyValueArchiver*)archiver
referenceToEncodeForObject: (id)object;
Returns an object to be used as
reference for 'archiver' to archive 'object'.
Should be overriden by EOKeyValueArchiver's
delegates
- Declared in:
- EOControl/EOKeyValueArchiver.h
Description forthcoming.
Method summary
- (void)
finishInitializationWithKeyValueUnarchiver: (
EOKeyValueUnarchiver*)unarchiver;
Description forthcoming.
- Declared in:
- EOControl/EOKeyValueArchiver.h
Description forthcoming.
Method summary
- (id)
unarchiver: (
EOKeyValueUnarchiver*)archiver
objectForReference: (id)keyPath;
Returns an object for archived 'reference'.
Implemented by EOKeyValueUnarchiver's delegate.
- Declared in:
- EOControl/EOKeyValueArchiver.h
Description forthcoming.
Method summary
- (void)
encodeWithKeyValueArchiver: (
EOKeyValueArchiver*)archiver;
Description forthcoming.
Up