Protocol.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
00003  *
00004  * @APPLE_LICENSE_HEADER_START@
00005  * 
00006  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
00007  * Reserved.  This file contains Original Code and/or Modifications of
00008  * Original Code as defined in and that are subject to the Apple Public
00009  * Source License Version 1.1 (the "License").  You may not use this file
00010  * except in compliance with the License.  Please obtain a copy of the
00011  * License at http://www.apple.com/publicsource and read it before using
00012  * this file.
00013  * 
00014  * The Original Code and all software distributed under the License are
00015  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
00016  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
00017  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
00018  * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
00019  * License for the specific language governing rights and limitations
00020  * under the License.
00021  * 
00022  * @APPLE_LICENSE_HEADER_END@
00023  */
00024 /*
00025     Protocol.h
00026     Copyright 1991-1996 NeXT Software, Inc.
00027 */
00028 
00029 #ifndef _OBJC_PROTOCOL_H_
00030 #define _OBJC_PROTOCOL_H_
00031 
00032 #import <objc/Object.h>
00033 
00034 struct objc_method_description {
00035     SEL name;
00036     char *types;
00037 };
00038 struct objc_method_description_list {
00039         int count;
00040         struct objc_method_description list[1];
00041 };
00042 
00043 @interface Protocol : Object
00044 {
00045 @private
00046     char *protocol_name;
00047     struct objc_protocol_list *protocol_list;
00048     struct objc_method_description_list *instance_methods, *class_methods;
00049 }
00050 
00051 /* Obtaining attributes intrinsic to the protocol */
00052 
00053 - (const char *)name;
00054 
00055 /* Testing protocol conformance */
00056 
00057 - (BOOL) conformsTo: (Protocol *)aProtocolObject;
00058 
00059 /* Looking up information specific to a protocol */
00060 
00061 - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
00062 - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel;
00063 
00064 @end
00065 
00066 #endif /* _OBJC_PROTOCOL_H_ */

Generated on Tue Sep 19 21:18:31 2006 for Boomerang by  doxygen 1.4.6