chore: Add course material
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// ======================================================
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user