]> err.no Git - sope/blob - sope-gdl1/GDLAccess/EOCustomValues.h
fixed bug in GDL adaptor lookup
[sope] / sope-gdl1 / GDLAccess / EOCustomValues.h
1 /* 
2    EOCustomValues.h
3
4    Copyright (C) 1996 Free Software Foundation, Inc.
5
6    Author: Mircea Oancea <mircea@jupiter.elcom.pub.ro>
7    Date: 1996
8
9    This file is part of the GNUstep Database Library.
10
11    This library is free software; you can redistribute it and/or
12    modify it under the terms of the GNU Library General Public
13    License as published by the Free Software Foundation; either
14    version 2 of the License, or (at your option) any later version.
15
16    This library is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19    Library General Public License for more details.
20
21    You should have received a copy of the GNU Library General Public
22    License along with this library; see the file COPYING.LIB.
23    If not, write to the Free Software Foundation,
24    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 */
26
27 #ifndef __EOCustomValues_h__
28 #define __EOCustomValues_h__
29
30 #import <Foundation/NSString.h>
31 #import <Foundation/NSData.h>
32 #import <Foundation/NSValue.h>
33
34 /*
35  * Informal protocols to initialize value-instances (used as objects
36  * in the dictionaries for the enterprise objects) and to convert
37  * those values to string or data.
38  * NOT implemented in NSObject
39  */
40
41 @interface NSObject(EOCustomValues)
42 - (id)initWithString:(NSString*)string type:(NSString*)type;
43 - (NSString*)stringForType:(NSString*)type;
44 @end
45
46 @interface NSObject(EODatabaseCustomValues)
47 - (id)initWithData:(NSData*)data type:(NSString*)type;
48 - (NSData*)dataForType:(NSString*)type;
49 @end
50
51 /*
52  *  These categories are added to NSString, NSData and NSNumber classes.
53  */
54
55 @interface NSString(EOCustomValues)
56 + stringWithString:(NSString*)string type:(NSString*)type;
57 - (id)initWithString:(NSString*)string type:(NSString*)type;
58 - (NSString*)stringForType:(NSString*)type;
59 - (id)initWithData:(NSData*)data type:(NSString*)type;
60 - (NSData*)dataForType:(NSString*)type;
61 @end
62
63 @interface NSData(EOCustomValues)
64 - initWithString:(NSString*)string type:(NSString*)type;
65 - (NSString*)stringForType:(NSString*)type;
66 - (id)initWithData:(NSData*)data type:(NSString*)type;
67 - (NSData*)dataForType:(NSString*)type;
68 @end
69
70 @interface NSNumber(EOCustomValues)
71 + (id)numberWithString:(NSString*)string type:(NSString*)type;
72 - (id)initWithString:(NSString*)string type:(NSString*)type;
73 - (NSString*)stringForType:(NSString*)type;
74 @end
75
76 #endif /* __EOCustomValues_h__ */
77
78
79 /*
80   Local Variables:
81   c-basic-offset: 4
82   tab-width: 8
83   End:
84 */