diff options
Diffstat (limited to 'comm/TimeOut.h')
-rw-r--r-- | comm/TimeOut.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/comm/TimeOut.h b/comm/TimeOut.h index aaaae63..fef1e22 100644 --- a/comm/TimeOut.h +++ b/comm/TimeOut.h @@ -11,51 +11,52 @@ * * $Id$ * $CurLog$ + * CHange handling of multiplexer */ -#ifndef UchTimeOut_H_ -#define UchTimeOut_H_ +#ifndef IvlTimeOut_H_ +#define IvlTimeOut_H_ -#include "ccu/Timer.h" -#include "Multiplexer.h" +#include "ivl/Timer.h" +#include "Scheduler.h" -class UchBaseTimeOut : public CcuCoreTimer { -friend class UchBaseMultiplexer; +class IvlBaseTimeOut : public IvlCoreTimer { +friend class IvlBaseScheduler; protected: - UchBaseMultiplexer* MyMpx; + IvlBaseScheduler* MyScd; void SetAlarm (Millisecond); void StopAlarm (); public: - UchBaseTimeOut (Millisecond, int = -1, UchBaseMultiplexer* = UchMpx); - ~UchBaseTimeOut (); + IvlBaseTimeOut (Millisecond, int = -1, IvlBaseScheduler* = IvlScd); + ~IvlBaseTimeOut (); }; -class UchTimeOut : public UchBaseTimeOut { +class IvlTimeOut : public IvlBaseTimeOut { protected: void (*Handler) (Millisecond); void Handle (Millisecond); public: - UchTimeOut (Millisecond, void (*) (Millisecond), int = -1, UchBaseMultiplexer* = UchMpx); - ~UchTimeOut (); + IvlTimeOut (Millisecond, void (*) (Millisecond), int = -1, IvlBaseScheduler* = IvlScd); + ~IvlTimeOut (); inline void SetHandler (void (*h) (Millisecond)) { Handler = h; } }; #define SpecializedTimeOut(R,S) \ -class R : public UchBaseTimeOut { \ +class R : public IvlBaseTimeOut { \ protected: \ S& Object; \ void (S::*Handler) (Millisecond); \ public: \ - R (Millisecond t, S& s, void (S::*sc) (Millisecond), int nb = -1, UchBaseMultiplexer* m = UchMpx) : UchBaseTimeOut (t, nb, m), Object (s), Handler (sc) {} \ + R (Millisecond t, S& s, void (S::*sc) (Millisecond), int nb = -1, IvlBaseScheduler* m = IvlScd) : IvlBaseTimeOut (t, nb, m), Object (s), Handler (sc) {} \ ~R () {} \ void Handle (Millisecond t) { (Object.*Handler) (t); } \ inline void SetHandler (void (S::*h) (Millisecond)) { Handler = h; } \ }; -template <class T> class UchTimeOutFor : public UchBaseTimeOut { +template <class T> class IvlTimeOutFor : public IvlBaseTimeOut { protected: T& Object; void (T::*Handler) (Millisecond); @@ -63,9 +64,9 @@ protected: void Handle (Millisecond ref) { (Object.*Handler) (ref); } public: - UchTimeOutFor (Millisecond t, T& o, void (T::*h) (Millisecond), int nb = -1, UchBaseMultiplexer* m = UchMpx) : UchBaseTimeOut (t, nb, m), Object (o), Handler (h) {} - ~UchTimeOutFor () {} + IvlTimeOutFor (Millisecond t, T& o, void (T::*h) (Millisecond), int nb = -1, IvlBaseScheduler* m = IvlScd) : IvlBaseTimeOut (t, nb, m), Object (o), Handler (h) {} + ~IvlTimeOutFor () {} inline void SetHandler (void(T::*h)(Millisecond)) { Handler = h; } }; -#endif /* UchTimeOut_H_ */ +#endif /* IvlTimeOut_H_ */ |