home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / Foundation.framework / Versions / B / Headers / NSCoder.h < prev    next >
Encoding:
Text File  |  1996-10-25  |  1.4 KB  |  53 lines

  1. /*      NSCoder.h
  2.     Abstract class for serializing arbitrary objects
  3.     Copyright 1994-1996, NeXT Software, Inc.  All rights reserved.
  4. */
  5.  
  6. #import <Foundation/NSObject.h>
  7.  
  8. @class NSString, NSData;
  9.  
  10. /****************** Basic functionality **********************/
  11.  
  12. @interface NSCoder : NSObject
  13.  
  14. - (void)encodeValueOfObjCType:(const char *)type at:(const void *)addr;
  15. - (void)encodeDataObject:(NSData *)data;
  16. - (void)decodeValueOfObjCType:(const char *)type at:(void *)data;
  17. - (NSData *)decodeDataObject;
  18. - (unsigned)versionForClassName:(NSString *)className;
  19.  
  20. @end
  21.  
  22. @interface NSCoder (NSExtendedCoder)
  23.     
  24. - (void)encodeObject:(id)object;
  25. - (void)encodePropertyList:(id)aPropertyList;
  26. - (void)encodeRootObject:(id)rootObject;
  27. - (void)encodeBycopyObject:(id)anObject;
  28.  
  29. #if !defined(STRICT_OPENSTEP)
  30.  
  31. - (void)encodeByrefObject:(id)anObject;
  32.  
  33. #endif
  34.  
  35. - (void)encodeConditionalObject:(id)object;
  36. - (void)encodeValuesOfObjCTypes:(const char *)types, ...;
  37. - (void)encodeArrayOfObjCType:(const char *)type count:(unsigned)count at:(const void *)array;
  38. - (void)encodeBytes:(void *)byteaddr length:(unsigned)length;
  39.  
  40. - (id)decodeObject;
  41. - (id)decodePropertyList;
  42. - (void)decodeValuesOfObjCTypes:(const char *)types, ...;
  43. - (void)decodeArrayOfObjCType:(const char *)itemType count:(unsigned)count at:(void *)array;
  44. - (void *)decodeBytesWithReturnedLength:(unsigned *)lengthp;
  45.  
  46. - (void)setObjectZone:(NSZone *)zone;
  47. - (NSZone *)objectZone;
  48.  
  49. - (unsigned)systemVersion;
  50.  
  51. @end
  52.  
  53.