Removed duplicate library base variables.
[AROS.git] / test / oop / timerclass.h
blob114c576f34981878a3a71e9a8b46042a97f7abe5
1 #ifndef TIMERCLASS_H
2 #define TIMERCLASS_H
4 /*
5 Copyright © 1997-98, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Demo of new OOP system
9 Lang: english
12 #include "oop.h"
14 #define TIMERCLASS "timerclass"
16 #define Timer_Base (1 << NUM_METHOD_BITS)
18 #define M_Timer_Start (Timer_Base + 0)
19 #define M_Timer_Stop (Timer_Base + 1)
20 #define M_Timer_PrintElapsed (Timer_Base + 2)
21 #define M_Timer_TestMethod (Timer_Base + 3)
23 #define NUM_TIMER_METHODS 4
25 #define Timer_Start(o) \
26 ({ \
27 ULONG methodid = M_Timer_Start; \
28 DoMethodA(o, (Msg)&methodid); \
31 #define Timer_Stop(o) \
32 ({ \
33 ULONG methodid = M_Timer_Stop; \
34 DoMethodA(o, (Msg)&methodid); \
37 #define Timer_PrintElapsed(o) \
38 ({ \
39 ULONG methodid = M_Timer_PrintElapsed; \
40 DoMethodA(o, (Msg)&methodid); \
43 #define Timer_TestMethod(o) \
44 ({ \
45 ULONG methodid = M_Timer_TestMethod; \
46 DoMethodA(o, (Msg)&methodid); \
49 Class *MakeTimerClass();
50 VOID FreeTimerClass(Class *cl);
52 #endif /* TIMERCLASS_H */