Files
cppcourse/397/Ex22/PelicanTimer.h
T
2026-10-05 11:27:21 +02:00

29 lines
657 B
C++

// ======================================================
//
// This class specializes the Timer to enable it to
// stimulate a Pelican
//
// ======================================================
#ifndef PELICANTIMER_H
#define PELICANTIMER_H
#include "Pelican.h"
#include "Timer.h"
class PelicanTimer : public Timer {
public:
typedef void (Pelican::*TargetFunc)();
PelicanTimer(Pelican &target, TargetFunc targetFunc);
// TODO: Rename this function to doExpired. The parameters and return type are unchanged.
virtual void tick();
private:
Pelican &myTarget;
TargetFunc myTargetFunc;
};
#endif