1 /* Interface for NSProtocolChecker for GNUStep
2    Copyright (C) 1995 Free Software Foundation, Inc.
3 
4    Written by:  Mike Kienenberger
5    Date: Jun 1998
6 
7    This file is part of the GNUstep Base Library.
8 
9    This library is free software; you can redistribute it and/or
10    modify it under the terms of the GNU Lesser General Public
11    License as published by the Free Software Foundation; either
12    version 2 of the License, or (at your option) any later version.
13 
14    This library is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17    Lesser General Public License for more details.
18 
19    You should have received a copy of the GNU Lesser General Public
20    License along with this library; if not, write to the Free
21    Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22    Boston, MA 02110 USA.
23    */
24 
25 #ifndef __NSProtocolChecker_h_GNUSTEP_BASE_INCLUDE
26 #define __NSProtocolChecker_h_GNUSTEP_BASE_INCLUDE
27 #import	<GNUstepBase/GSVersionMacros.h>
28 
29 #import	<Foundation/NSObject.h>
30 #import	<Foundation/NSProxy.h>
31 
32 #if	defined(__cplusplus)
33 extern "C" {
34 #endif
35 
36 @class Protocol;
37 
38 @interface NSProtocolChecker : NSProxy
39 {
40 #if	GS_EXPOSE(NSProtocolChecker)
41 @private
42   Protocol *_myProtocol;
43   NSObject *_myTarget;
44 #endif
45 #if     GS_NONFRAGILE
46 #else
47   /* Pointer to private additional data used to avoid breaking ABI
48    * when we don't have the non-fragile ABI available.
49    * Use this mechanism rather than changing the instance variable
50    * layout (see Source/GSInternal.h for details).
51    */
52   @private id _internal GS_UNUSED_IVAR;
53 #endif
54 }
55 
56 // Creating a checker
57 
58 + (id) protocolCheckerWithTarget: (NSObject*)anObject
59 			protocol: (Protocol*)aProtocol;
60 
61 - (id) initWithTarget: (NSObject*)anObject
62 	     protocol: (Protocol*)aProtocol;
63 
64 // Reimplemented NSObject methods
65 
66 - (void) forwardInvocation: (NSInvocation*)anInvocation;
67 
68 // Getting information
69 - (Protocol*) protocol;
70 - (NSObject*) target;
71 
72 @end
73 
74 #if	defined(__cplusplus)
75 }
76 #endif
77 
78 #endif
79