Protocol.h
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:2k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. /* Declare the class Protocol for Objective C programs.
  2.    Copyright (C) 1993 Free Software Foundation, Inc.
  3. This file is part of GNU CC.
  4. GNU CC is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GNU CC is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU CC; see the file COPYING.  If not, write to
  14. the Free Software Foundation, 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.  */
  16. /* As a special exception, if you link this library with files
  17.    compiled with GCC to produce an executable, this does not cause
  18.    the resulting executable to be covered by the GNU General Public License.
  19.    This exception does not however invalidate any other reasons why
  20.    the executable file might be covered by the GNU General Public License.  */
  21. #ifndef __Protocol_INCLUDE_GNU
  22. #define __Protocol_INCLUDE_GNU
  23. #include "objc/Object.h"
  24. @interface Protocol : Object
  25. {
  26. @private
  27.         char *protocol_name;
  28.         struct objc_protocol_list *protocol_list;
  29.         struct objc_method_description_list *instance_methods, *class_methods; 
  30. }
  31. /* Obtaining attributes intrinsic to the protocol */
  32. - (const char *)name;
  33. /* Testing protocol conformance */
  34. - (BOOL) conformsTo: (Protocol *)aProtocolObject;
  35. /* Looking up information specific to a protocol */
  36. - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
  37. - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel;
  38. @end
  39. #endif