This is GSArchiver.h in view mode; [Download] [Up]
/* from
* (Preliminary Documentation) Copyright (c) 1994 by NeXT Computer, Inc.
* All Rights Reserved.
*
* part of Foundation Kit
*
* a NSArchiver for GNU archiving
*
*/
#ifndef __GSArchiver_include__
#define __GSArchiver_include__
#include "GSCoder.h"
#define NXACTIVE_ARCHIVER "NXActive_Archiver"
extern id NXActive_Archiver;
@class NSData, NSMutableData, NSString;
@interface GSArchiver : GSCoder
{
NSMutableData *theData;
}
// Initializing an NSArchiver
// - (id)initForWritingWithMutableData:(NSMutableData *)mdata;
/*
* Initializes an archiver, encoding stream and version information into
* mutable data mdata.
*/
// Archiving data
// + (NSData *)archivedDataWithRootObject:(id)rootObject;
/*
* Creates and returns a data object after initializing an archiver with
* that object and encoding the archiver with rootObject.
*/
+ (BOOL)archiveRootObject:(id)rootObject
toFile:(NSString *)path;
/*
* Archives rootObject by encoding it as a data object in an archiver and
* writing that data object to file path. Returns YES upon success.
*/
- initForWritingToFile:(NSString *)path;
/*
* Initializes Archiver for writing to file.
* (Not an OpenStep method)
*/
- finishWriting;
/*
* Finishing writing to file
* (Not an OpenStep method)
*/
// - (void)encodeArrayOfObjCType:(const char *)type
// count:(unsigned int)count
// at:(const void *)array;
/*
* Encodes an array of count data elements of the same Objective C data
* type.
*/
// - (void)encodeConditionalObject:(id)object;
/*
* Encodes into the linearized data a conditional object that points back
* toward a root object. If nil is specified for object, it encodes it as
* nil unconditionally. Raises an exception if no root object has been
* encoded.
*/
//- (void)encodeRootObject:(id)rootObject;
/*
* Encodes the rootObject at the start of the linearized data representing
* the object graph. Raises an exception if the root object has already
* been encoded.
*/
// Getting data from the archiver
// - (NSMutableData *)archiverData;
/*
* Returns the data object, in mutable form, that is associated with the
* receiving NSArchiver.
*/
// Substituting One Class for Another
// + (NSString *)classNameEncodedForTrueClassName:(NSString *)trueName;
/*
* Returns the string object representing the class name used to archive
* instances of the class. This class name might not be the original name
* (trueName): see encodeClassName:intoClassName.
*/
// - (void)encodeClassName:(NSString *)trueName
// intoClassName:(NSString *)inArchiveName;
/*
* Encodes in the archived data a substitute class name (inArchiveName) for
* the real class name (trueName).
*/
@end
@interface GSUnarchiver : GSCoder
// Initializing an NSUnarchiver
// - (id)initForReadingWithData:(NSData *)data;
/*
* Initializes an NSUnarchiver object from data object data.
*/
// Decoding Objects
// + (id)unarchiveObjectWithData:(NSData *)data;
/*
* Decodes an archived object stored in data.
*/
- initForReadingWithStream:(NXStream *)stream;
/*
* Fake NSData method with stream
*/
- initForReadingFromFile:(char *)filename;
/*
* Open a typed stream, given the filename
*/
- free;
/*
* Closes any open stream
*/
+ (id)unarchiveObjectWithFile:(NSString *)path;
/*
* Decodes an archived object stored in the file path.
*/
// - (void)decodeArrayOfObjCType:(const char *)itemType
// count:(unsigned int)count
// at:(void *)array;
/*
* Decodes an array of count data elements of the same Objective C data
* itemType.
*/
// Managing an NSUnarchiver
// - (BOOL)isAtEnd;
/*
* Returns YES if the end of data is reached, NO if more data follows.
*/
// - (NSZone *)objectZone;
/*
* Returns the allocation zone for the unarchiver object.
*/
- (void)setObjectZone:(NSZone *)zone;
/*
* Does nothing but keep the compiler happy
*/
// - (unsigned int)systemVersion;
/*
* Returns the system version number for the unarchived data.
*/
// Substituting One Class For Another
// + (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName;
/*
* Returns the string object representing the class name used to archive
* instances of the class (inArchiveName). This may not be the original
* class name but another name encoded with NXArchiver's
* encodeClassName:intoClassName.
*/
// + (void)decodeClassName:(NSString *)inArchiveName
// asClassName:(NSString *)trueName;
/*
* Decodes from the archived data a class name (inArchiveName) substituted
* for the real class name (trueName). This method enables easy conversion
* of unarchived data when there are name changes in classes.
*/
// - (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName;
/*
* Returns the string object representing the class name used to archive
* instances of the class (inArchiveName). This may not be the original
* class name but another name encoded with NXArchiver's
* encodeClassName:intoClassName.
*/
// - (void)decodeClassName:(NSString *)inArchiveName
// asClassName:(NSString *)trueName;
/*
* Decodes from the archived data a class name (inArchiveName) substituted
* for the real class name (trueName). This method enables easy conversion
* of unarchived data when there are name changes in classes.
*/
@end
#endif /* __GSArchiver_include__ */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.