28 lines
541 B
C++
28 lines
541 B
C++
// ======================================================
|
|
//
|
|
// This class specializes the Timer to enable it to
|
|
// stimulate a Light
|
|
//
|
|
// ======================================================
|
|
|
|
#ifndef LightTimer_H
|
|
#define LightTimer_H
|
|
|
|
#include "Light.h"
|
|
#include "Timer.h"
|
|
|
|
class LightTimer : public Timer {
|
|
public:
|
|
typedef void (Light::*TargetFunc)();
|
|
|
|
LightTimer(Light &target, TargetFunc targetFunc);
|
|
|
|
private:
|
|
void doExpired();
|
|
|
|
Light &myTarget;
|
|
TargetFunc myTargetFunc;
|
|
};
|
|
|
|
#endif
|