New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / test / oop2 / method.c
blobbd4d1625925ca68e9c7c1fecec0c38909df80690
1 /*
2 (C) 1997-98 AROS - The Amiga Research OS
3 $Id$
5 Desc: Demo of new OOP system
6 Lang: english
7 */
9 #include "types.h"
10 #include "oop.h"
12 #define CallMethod(cl, o, msg) \
13 { \
14 if (!(msg->MethodID >> NUM_METHOD_BITS)) \
15 { \
16 register struct Method *m = &(cl->MTable[msg->MethodID & METHOD_MASK]);\
17 return ( m->MethodFunc(m->m_Class, o, msg)); \
18 } \
19 return (NULL);\
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);