📄 myactiveobject.h
字号:
/*
============================================================================
Name : MyActiveObject.h
Author :
Version : 1.0
Copyright : Your copyright notice
Description : CMyActiveObject declaration
============================================================================
*/
#ifndef MYACTIVEOBJECT_H
#define MYACTIVEOBJECT_H
#include <e32base.h> // For CActive, link against: euser.lib
#include <e32std.h> // For RTimer, link against: euser.lib
#include <e32cons.h>
class CMyActiveObject : public CActive
{
public:
// Cancel and destroy
~CMyActiveObject();
// Two-phased constructor.
static CMyActiveObject* NewL(CConsoleBase& aConsole);
// Two-phased constructor.
static CMyActiveObject* NewLC(CConsoleBase& aConsole);
public:
// New functions
// Function for making the initial request
void StartL(TTimeIntervalMicroSeconds32 aDelay);
private:
// C++ constructor
CMyActiveObject(CConsoleBase& aConsole);
// Second-phase constructor
void ConstructL();
private:
// From CActive
// Handle completion
void RunL();
// How to cancel me
void DoCancel();
// Override to handle leaves from RunL(). Default implementation causes
// the active scheduler to panic.
TInt RunError(TInt aError);
private:
RTimer iTimer; // Provides async timing service
TInt iCount;
CConsoleBase& iConsole;
CActiveSchedulerWait* iWait;
};
#endif // MYACTIVEOBJECT_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -