Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

CGameDocument Class Reference

Game Document. More...

#include <CGameDocument.h>

Collaboration diagram for CGameDocument:

Collaboration graph
[legend]
List of all members.

Public Methods

 CGameDocument (CEikApplication &aApp)
 construtor. More...

 ~CGameDocument ()
 destructor. More...

void ConstructL ()
 2nd phase construction. More...

CGameStateGameState ()
 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

CGameStateiGameState
 Game state information. More...


Detailed Description

Game Document.

Just owns the game state information

Definition at line 27 of file CGameDocument.h.


Constructor & Destructor Documentation

CGameDocument::CGameDocument CEikApplication &    aApp
 

construtor.

Definition at line 25 of file CGameDocument.cpp.

Referenced by NewL().

00026                 : CEikDocument(aApp) {
00027         
00028 }

CGameDocument::~CGameDocument  
 

destructor.

Definition at line 58 of file CGameDocument.cpp.

References iGameState.

00058                               { 
00059   delete iGameState;
00060 }


Member Function Documentation

CGameDocument * CGameDocument::NewL CEikApplication &    aApp [static]
 

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 }

void CGameDocument::ConstructL  
 

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 }

CGameState * CGameDocument::GameState  
 

return game state.

Definition at line 70 of file CGameDocument.cpp.

References iGameState.

00070                                      {
00071   return iGameState;
00072 }

CEikAppUi * CGameDocument::CreateAppUiL   [private]
 

construct an app ui.

Definition at line 65 of file CGameDocument.cpp.

00065                                        {        
00066   return new(ELeave) CGameAppUi();
00067 }


Member Data Documentation

CGameState* CGameDocument::iGameState [private]
 

Game state information.

Definition at line 36 of file CGameDocument.h.

Referenced by ConstructL(), GameState(), and ~CGameDocument().


The documentation for this class was generated from the following files:
Documentation for Game (Beta) version 1.44.