home *** CD-ROM | disk | FTP | other *** search
- // EOCustomValues.h
- // Copyright (c) 1994, NeXT Computer, Inc. All rights reserved
-
- #import <foundation/NSArray.h>
- #import <foundation/NSData.h>
- #import <foundation/NSDictionary.h>
- #import <foundation/NSObject.h>
- #import <foundation/NSString.h>
-
-
- // These informal protocols are used to package data fields from the database
- // server into custom value objects. A custom value objects holds a single
- // row's value for a particular column. You might map a BLOB column to an
- // NXImage subclass, for example, or a text entry field to a custom NSString
- // subclass.
-
-
- // The EOCustomValues category defines methods that custom value classes must
- // implement in order to work correctly with the controller (user interface)
- // framework. These methods initialize an object with an NSString object and
- // optionally may use the "type" argument to describe the format or contents
- // of the string. A type may be something like "RTF", for example.
-
- // Classes that implement this category must also conform to the NSObject
- // and NSCopying protocols.
-
- @interface NSObject (EOCustomValues)
-
- - initWithString:(NSString *)string type:(NSString *)type;
- - (NSString *)stringForType:(NSString *)type;
-
- @end
-
-
- // The EODatabaseCustomValue category defines additional methods that custom
- // value classes must implement when working with the access layer. These
- // methods initialize an object with an NSData object and may optionally use
- // the "type" argument to describe the format or contents of the data. A type
- // may be something like "TIFF", for example.
-
- @interface NSObject (EODatabaseCustomValues)
-
- - initWithData:(NSData *)data type:(NSString *)type;
- - (NSData *)dataForType:(NSString *)type;
-
- @end
-