TetrisDocument.cpp
上传用户:snevogroup
上传日期:2008-06-06
资源大小:432k
文件大小:1k
- #include "TetrisAppUi.h"
- #include "TetrisDocument.h"
- #include "CGameTetris.h"
- // Construct and Destruct
- // NewL()
- CTetrisDocument* CTetrisDocument::NewL(CEikApplication& aApp)
- {
- CTetrisDocument* self = NewLC(aApp);
- CleanupStack::Pop(self);
-
- return self;
- }
- // NewLC()
- CTetrisDocument* CTetrisDocument::NewLC(CEikApplication& aApp)
- {
- CTetrisDocument* self = new (ELeave) CTetrisDocument(aApp);
- CleanupStack::PushL(self);
- self->ConstructL();
- return self;
- }
- // ConstructL()
- void CTetrisDocument::ConstructL()
- {
- iGame = CGameTetris::NewL();
- }
- // CTetrisDocument()
- CTetrisDocument::CTetrisDocument(CEikApplication& aApp) : CAknDocument(aApp)
- {
-
- }
- // ~CTetrisDocument()
- CTetrisDocument::~CTetrisDocument()
- {
- delete iGame;
- }
- ///////////////////////////////////////////////////////////////
- // method
- // CreateAppUi()
- CEikAppUi* CTetrisDocument::CreateAppUiL()
- {
- CEikAppUi* appUi = new (ELeave) CTetrisAppUi(this);
- return appUi;
- }
- CGameTetris* CTetrisDocument::Model()
- {
- return iGame;
- }