5 Copyright © 1997-98, The AROS Development Team. All rights reserved.
8 Desc: Demo of new OOP system
14 #define TIMERCLASS "timerclass"
16 #define MIDX_Timer_Start 0
17 #define MIDX_Timer_Stop 1
18 #define MIDX_Timer_PrintElapsed 2
19 #define MIDX_Timer_TestMethod 3
23 # define Timer_Base (I_Timer << NUM_METHOD_BITS)
25 # define M_Timer_Start (Timer_Base + 0)
26 # define M_Timer_Stop (Timer_Base + 1)
27 # define M_Timer_PrintElapsed (Timer_Base + 2)
28 # define M_Timer_TestMethod (Timer_Base + 3)
30 # define METHODID IPTR
35 # define Timer_Base (I_Timer << NUM_METHOD_BITS)
37 # define M_Timer_Start (Timer_Base + MIDX_Timer_Start)
38 # define M_Timer_Stop (Timer_Base + MIDX_Timer_Stop)
39 # define M_Timer_PrintElapsed (Timer_Base + MIDX_Timer_PrintElapsed)
40 # define M_Timer_TestMethod (Timer_Base + MIDX_Timer_TestMethod)
42 # define METHODID IPTR
46 # define M_Timer_Start "Start"
47 # define M_Timer_Stop "Stop"
48 # define M_Timer_PrintElapsed "PrintElapsed"
49 # define M_Timer_TestMethod "TestMethod"
51 # define METHODID STRPTR
54 #define Timer_Start(o) \
56 METHODID methodid = M_Timer_Start; \
57 DoMethodA(o, (Msg)&methodid); \
60 #define Timer_Stop(o) \
62 METHODID methodid = M_Timer_Stop; \
63 DoMethodA(o, (Msg)&methodid); \
66 #define Timer_PrintElapsed(o) \
68 METHODID methodid = M_Timer_PrintElapsed; \
69 DoMethodA(o, (Msg)&methodid); \
72 #define Timer_TestMethod(o) \
74 METHODID methodid = M_Timer_TestMethod; \
75 DoMethodA(o, (Msg)&methodid); \
78 Class
*MakeTimerClass();
79 VOID
FreeTimerClass(Class
*cl
);
81 #endif /* TIMERCLASS_H */