4 Copyright © 1997-98, The AROS Development Team. All rights reserved.
7 Desc: Demo of new OOP system
23 /* Array of pointers to methodtables for this class */
24 struct Node ClassNode
;
29 /* The number of methods introduced by this class */
35 struct IClass
*SuperClass
;
36 struct Method
*MTable
;
37 ULONG MTableSize
; /* Counted in # of entries, not in bytes */
61 /* Used when initializing a class */
73 #define NUM_METHOD_BITS 10
74 #define METHOD_MASK ((1 << (NUM_METHOD_BITS)) - 1)
76 #define BASEOBJECT(obj) ((Object *)(_OBJ(obj) + 1))
77 #define _OBJECT(obj) (_OBJ(obj) - 1)
78 #define _OBJ(obj) ((struct _Object *)(obj))
80 #define INST_DATA(cl, obj) \
81 (((VOID *)(obj)) + cl->InstOffset)
84 #define OCLASS(o) (_OBJECT(o)->o_Class)
87 #define ROOTCLASS "rootclass"
89 #define NUM_ROOT_METHODS 2