OSDN Git Service

2010-04-22 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc-obj-c++-shared / Protocol1.h
1 /* 
2  * Temporary work-around to avoid the need for method attributes in
3  * the NeXT Runtime Protocol header.
4  */
5 #ifndef _OBJC_PROTOCOL1_H_
6 #define _OBJC_PROTOCOL1_H_
7
8 #  ifndef __NEXT_RUNTIME__
9 #    include <objc/Protocol.h>
10 #  else
11 #    include "next-abi.h"
12 #    ifndef NEXT_OBJC_USE_NEW_INTERFACE
13 /* We are on a NeXT version without method __attributes__ */
14 #      import <objc/Protocol.h>
15 #    else
16 /* We make our own interface without the deprecation messages 
17  * This is essentially <objc/Protocol.h> without the OBJC2
18  * flags.
19  * 
20  */
21 #      ifndef _OBJC_PROTOCOL_H_
22 #      define _OBJC_PROTOCOL_H_
23 #      import "Object1.h"
24
25 @interface Protocol : Object
26 {
27 @private
28     char *protocol_name ;
29     struct objc_protocol_list *protocol_list ;
30     struct objc_method_description_list *instance_methods ;
31     struct objc_method_description_list *class_methods ;
32 }
33
34 /* Obtaining attributes intrinsic to the protocol */
35 #if (NEXT_OBJC_ABI_VERSION==0)
36 - (const char *)name ; /* Not avail in v2, deprecated in prior */
37 /* Testing protocol conformance */
38 - (BOOL) conformsTo: (Protocol *)aProtocolObject ; /* Not avail in v2 */
39 #endif
40
41 /* Looking up information specific to a protocol */
42 /* Deprecated, but available */
43
44 - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel ;
45 - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel ;
46
47 @end
48
49 #      endif /* __NEXT_RUNTIME__ */
50 #    endif /* _OBJC_PROTOCOL_H_ */
51 #  endif /* NEXT_OBJC_ABI_VERSION */
52 #endif /* _OBJC_PROTOCOL1_H_ */