OSDN Git Service

In libobjc:
[pf3gnuchains/gcc-fork.git] / libobjc / objc / deprecated / struct_objc_class.h
1 /* This structure used to be public, but is now private to the runtime.  */
2
3 /*
4 ** The compiler generates one of these structures for each class.  
5 ** 
6 ** This structure is the definition for classes. 
7 ** 
8 ** This structure is generated by the compiler in the executable and used by
9 ** the run-time during normal messaging operations.  Therefore some members
10 ** change type. The compiler generates "char* const" and places a string in
11 ** the following member variables:  super_class. 
12 */
13 struct objc_class {     
14   MetaClass           class_pointer;          /* Pointer to the class's
15                                                 meta class. */
16   struct objc_class*  super_class;            /* Pointer to the super 
17                                                 class. NULL for class 
18                                                 Object. */
19   const char*         name;                   /* Name of the class. */
20   long                version;                /* Unknown. */
21   unsigned long       info;                   /* Bit mask.  See class masks 
22                                                 defined above. */
23   long                instance_size;          /* Size in bytes of the class.  
24                                                 The sum of the class 
25                                                 definition and all super 
26                                                 class definitions. */
27   struct objc_ivar_list* ivars;               /* Pointer to a structure that
28                                                 describes the instance 
29                                                 variables in the class
30                                                 definition.  NULL indicates
31                                                 no instance variables.  Does
32                                                 not include super class
33                                                 variables. */
34   struct objc_method_list*  methods;          /* Linked list of instance
35                                                 methods defined for the 
36                                                 class. */
37   struct sarray *    dtable;                  /* Pointer to instance 
38                                                  method dispatch table. */  
39   struct objc_class* subclass_list;           /* Subclasses */
40   struct objc_class* sibling_class;
41
42   struct objc_protocol_list *protocols;       /* Protocols conformed to */
43   void* gc_object_type;
44 };