#include <CGameDocument.h>
Collaboration diagram for CGameDocument:

Public Methods | |
| CGameDocument (CEikApplication &aApp) | |
| construtor. More... | |
| ~CGameDocument () | |
| destructor. More... | |
| void | ConstructL () |
| 2nd phase construction. More... | |
| CGameState * | GameState () |
| return game state. More... | |
Static Public Methods | |
| CGameDocument * | NewL (CEikApplication &aApp) |
| Leave safe construction. More... | |
Private Methods | |
| CEikAppUi * | CreateAppUiL () |
| construct an app ui. More... | |
Private Attributes | |
| CGameState * | iGameState |
| Game state information. More... | |
Just owns the game state information
Definition at line 27 of file CGameDocument.h.
|
|
construtor.
Definition at line 25 of file CGameDocument.cpp. Referenced by NewL().
00026 : CEikDocument(aApp) {
00027
00028 }
|
|
|
destructor.
Definition at line 58 of file CGameDocument.cpp. References iGameState.
00058 {
00059 delete iGameState;
00060 }
|
|
|
Leave safe construction.
Definition at line 31 of file CGameDocument.cpp. References CGameDocument(), and ConstructL(). Referenced by CGameApplication::CreateDocumentL().
00031 {
00032 CGameDocument* self=new (ELeave) CGameDocument(aApp);
00033 CleanupStack::PushL(self);
00034 self->ConstructL();
00035 CleanupStack::Pop();
00036 return self;
00037 }
|
|
|
2nd phase construction. Work out where we have been loaded from, and use that as location for high score table file Definition at line 44 of file CGameDocument.cpp. References iGameState, and CGameState::NewL(). Referenced by NewL().
00044 {
00045 TParse parse;
00046 parse.Set(Application()->DllName(),NULL,NULL);
00047 _LIT(KScores,"scores");
00048 HBufC* filename=HBufC::NewLC(parse.DriveAndPath().Length()+
00049 KScores().Length());
00050 filename->Des().Append(parse.DriveAndPath());
00051 filename->Des().Append(KScores);
00052 iGameState = CGameState::NewL(*filename);
00053 CleanupStack::PopAndDestroy(filename);
00054 }
|
|
|
return game state.
Definition at line 70 of file CGameDocument.cpp. References iGameState.
00070 {
00071 return iGameState;
00072 }
|
|
|
construct an app ui.
Definition at line 65 of file CGameDocument.cpp.
00065 {
00066 return new(ELeave) CGameAppUi();
00067 }
|
|
|
Game state information.
Definition at line 36 of file CGameDocument.h. Referenced by ConstructL(), GameState(), and ~CGameDocument(). |