2 Copyright © 1997-98, The AROS Development Team. All rights reserved.
5 Desc: Demo of new OOP system
12 #define CallMethod(cl, o, msg) \
14 if (!(msg->MethodID >> NUM_METHOD_BITS)) \
16 register struct Method *m = &(cl->MTable[msg->MethodID & METHOD_MASK]);\
17 return ( m->MethodFunc(m->m_Class, o, msg)); \
22 IPTR
CoerceMethodA(Class
*cl
, Object
*o
, Msg msg
)
24 CallMethod(cl
, o
, msg
);
27 IPTR
DoMethodA(Object
*o
, Msg msg
)
29 register Class
*cl
= OCLASS(o
);
30 CallMethod(cl
, o
, msg
);
33 IPTR
DoSuperMethodA(Class
*cl
, Object
*o
, Msg msg
)
35 Class
*super
= cl
->SuperClass
;
36 CallMethod(super
, o
, msg
);