5 # include <exec/types.h>
11 /* Array of pointers to methodtables for this class */
12 struct Node ClassNode
;
14 IPTR
**InterfaceTable
;
15 struct IClass
**ClassTable
;
20 /* The number of methods that are new for this class */
26 /* Can also be gotten with indexing the ClassTable */
27 struct IClass
*SuperClass
;
29 /* What level in the hierarchy are we ? */
40 /* Used when initializing a class */
49 #define BASEOBJECT(obj) ((Object *)(_OBJ(obj) + 1))
50 #define _OBJECT(obj) (_OBJ(obj) - 1)
51 #define _OBJ(obj) ((struct _Object *)(obj))
53 #define INST_DATA(obj, cl_level) \
54 (((VOID *)(obj)) + _OBJECT(obj)->Class->ClassTable[(cl_level)]->InstOffset)
56 #define CL_INTERFACE(cl, cl_level, if_level) \
57 ((cl)->ClassTable[(cl_level)]->InterfaceTable[(if_level)])
59 #define OBJ_INTERFACE(o, cl_level, if_level) \
60 (_OBJECT(o)->Class->ClassTable[(cl_level)]->InterfaceTable[(if_level)])
62 #define ROOTCLASSNAME "rootclass"
64 #define CL_Level_Root 0UL /* Root is on top of hierachy */
65 #define IF_Level_Root 0UL /* Root is on top of hierachy */
68 typedef struct RootInterface
70 Object (*New
)(Class
*, APTR
);
71 VOID (*Dispose
)(Object
);
74 typedef struct RootIFStorage
79 #endif /* OOPSYS_CLASS_H */