?? simpleclock.h
字號(hào):
#include <e32base.h>
#ifndef _SIMPLE_CLOCK_
#define _SIMPLE_CLOCK_
class MClockObserver
{
public:
virtual void UpdateClock(TTime aTime) = 0;
};
//////////////////////////////////////////////////////////////////////////////
//
// -----> CSimpleClock (definition)
//
//////////////////////////////////////////////////////////////////////////////
class CSimpleClock : public CTimer
{
public:
// Construction
CSimpleClock();
// Destruction
~CSimpleClock();
public:
// Static construction
static CSimpleClock* NewL();
static CSimpleClock* NewLC(const TTime & aTime);
static CSimpleClock* NewL(const TTime & aTime);
public:
// Second phase construction
void ConstructL(const TTime & aTime);
// Cancel request
// Defined as pure virtual by CActive;
// implementation provided by this class.
void DoCancel();
// service completed request.
// Defined as pure virtual by CActive;
// implementation provided by this class.
void RunL();
void Start() ;
void Stop(){iStop = TRUE;}
//void SetObserver(MClockObserver * aObserver){iObserver = aObserver;}
void AddObserver(MClockObserver * aObserver);
void RemoveObserver(MClockObserver *aObserver);
void SetCurTime(TTime aTime) {iTime = aTime;}
TTime CurTime(){return iTime;}
protected:
// issue request
void IssueRequest();
private:
TTime iTime;
TBool iStop;
CArrayFixFlat<MClockObserver *> * iObservers;
};
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -