]>
Commit | Line | Data |
---|---|---|
88e17b57 | 1 | /* Declare the class Protocol for Objective C programs. |
1a6213c3 | 2 | Copyright (C) 1993, 2004 Free Software Foundation, Inc. |
88e17b57 | 3 | |
6c82ad25 | 4 | This file is part of GCC. |
88e17b57 | 5 | |
6c82ad25 | 6 | GCC is free software; you can redistribute it and/or modify |
88e17b57 BE |
7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
6c82ad25 | 11 | GCC is distributed in the hope that it will be useful, |
88e17b57 BE |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
6c82ad25 | 17 | along with GCC; see the file COPYING. If not, write to |
f9d09c43 KC |
18 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
19 | Boston, MA 02110-1301, USA. */ | |
88e17b57 BE |
20 | |
21 | /* As a special exception, if you link this library with files | |
22 | compiled with GCC to produce an executable, this does not cause | |
23 | the resulting executable to be covered by the GNU General Public License. | |
24 | This exception does not however invalidate any other reasons why | |
25 | the executable file might be covered by the GNU General Public License. */ | |
26 | ||
27 | #ifndef __Protocol_INCLUDE_GNU | |
28 | #define __Protocol_INCLUDE_GNU | |
29 | ||
cf223603 | 30 | #include "Object.h" |
1a6213c3 ZL |
31 | |
32 | #ifdef __cplusplus | |
33 | extern "C" { | |
34 | #endif | |
88e17b57 BE |
35 | |
36 | @interface Protocol : Object | |
37 | { | |
38 | @private | |
39 | char *protocol_name; | |
40 | struct objc_protocol_list *protocol_list; | |
41 | struct objc_method_description_list *instance_methods, *class_methods; | |
42 | } | |
43 | ||
44 | /* Obtaining attributes intrinsic to the protocol */ | |
45 | ||
46 | - (const char *)name; | |
47 | ||
48 | /* Testing protocol conformance */ | |
49 | ||
50 | - (BOOL) conformsTo: (Protocol *)aProtocolObject; | |
51 | ||
52 | /* Looking up information specific to a protocol */ | |
53 | ||
54 | - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel; | |
55 | - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel; | |
56 | ||
57 | @end | |
58 | ||
1a6213c3 ZL |
59 | #ifdef __cplusplus |
60 | } | |
61 | #endif | |
88e17b57 | 62 | |
2e3120e8 | 63 | #endif /* not __Protocol_INCLUDE_GNU */ |