home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / objc / Protocol.h < prev    next >
Text File  |  1996-11-27  |  1KB  |  49 lines

  1. /*
  2.     Protocol.h
  3.     Copyright 1991-1996 NeXT Software, Inc.
  4. */
  5.  
  6. #ifndef _OBJC_PROTOCOL_H_
  7. #define _OBJC_PROTOCOL_H_
  8.  
  9. #import <objc/Object.h>
  10.  
  11. struct objc_method_description {
  12.     SEL name;
  13.     char *types;
  14. };
  15. struct objc_method_description_list {
  16.         int count;
  17.         struct objc_method_description list[1];
  18. };
  19.  
  20. @interface Protocol : Object
  21. {
  22. @private
  23.     char *protocol_name;
  24.      struct objc_protocol_list *protocol_list;
  25.       struct objc_method_description_list *instance_methods, *class_methods;
  26. #ifdef NeXT_PDO    /* hppa needs 8 byte aligned protocol blocks */
  27. #ifdef __hpux
  28.     unsigned long    risc_pad; 
  29. #endif __hpux
  30. #endif NeXT_PDO
  31. }
  32.  
  33. /* Obtaining attributes intrinsic to the protocol */
  34.  
  35. - (const char *)name;
  36.  
  37. /* Testing protocol conformance */
  38.  
  39. - (BOOL) conformsTo: (Protocol *)aProtocolObject;
  40.  
  41. /* Looking up information specific to a protocol */
  42.  
  43. - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
  44. - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel;
  45.  
  46. @end
  47.  
  48. #endif /* _OBJC_PROTOCOL_H_ */
  49.