home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / 3.3Headers / eoaccess / EOCustomValues.h < prev    next >
Encoding:
Text File  |  1994-10-12  |  1.7 KB  |  47 lines

  1. // EOCustomValues.h
  2. // Copyright (c) 1994, NeXT Computer, Inc.  All rights reserved
  3.  
  4. #import <foundation/NSArray.h>
  5. #import <foundation/NSData.h>
  6. #import <foundation/NSDictionary.h>
  7. #import <foundation/NSObject.h>
  8. #import <foundation/NSString.h>
  9.  
  10.  
  11. // These informal protocols are used to package data fields from the database
  12. // server into custom value objects.  A custom value objects holds a single
  13. // row's value for a particular column.  You might map a BLOB column to an
  14. // NXImage subclass, for example, or a text entry field to a custom NSString
  15. // subclass.
  16.  
  17.  
  18. // The EOCustomValues category defines methods that custom value classes must
  19. // implement in order to work correctly with the controller (user interface)
  20. // framework.  These methods initialize an object with an NSString object and
  21. // optionally may use the "type" argument to describe the format or contents
  22. // of the string.  A type may be something like "RTF", for example.
  23.  
  24. // Classes that implement this category must also conform to the NSObject
  25. // and NSCopying protocols.
  26.  
  27. @interface NSObject (EOCustomValues)
  28.  
  29. - initWithString:(NSString *)string type:(NSString *)type;
  30. - (NSString *)stringForType:(NSString *)type;
  31.  
  32. @end
  33.  
  34.  
  35. // The EODatabaseCustomValue category defines additional methods that custom
  36. // value classes must implement when working with the access layer.  These
  37. // methods initialize an object with an NSData object and may optionally use
  38. // the "type" argument to describe the format or contents of the data.  A type
  39. // may be something like "TIFF", for example.
  40.  
  41. @interface NSObject (EODatabaseCustomValues)
  42.  
  43. - initWithData:(NSData *)data type:(NSString *)type;
  44. - (NSData *)dataForType:(NSString *)type;
  45.  
  46. @end
  47.