Game Class Reference

abstract algorithm controls the game More...

#include <Game.h>

Inherited by GameContext.

List of all members.

Public Member Functions

 Game ()
bool run ()
void finish ()
virtual ~Game ()

Protected Member Functions

virtual bool doInit ()=0
virtual void doPreProcess ()
virtual void doLoop ()=0
virtual void doPostProcess ()

Detailed Description

abstract algorithm controls the game

This class use template method pattern.

Definition at line 5 of file Game.h.


Constructor & Destructor Documentation

Game::Game (  ) 

The abstract constructor. Cant use in this context.

Definition at line 3 of file Game.cpp.

virtual Game::~Game (  )  [inline, virtual]

Definition at line 14 of file Game.h.


Member Function Documentation

virtual bool Game::doInit (  )  [protected, pure virtual]

A primitive operation called one time to initialize some data. You have to override.

Implemented in GameContext.

Here is the caller graph for this function:

virtual void Game::doLoop (  )  [protected, pure virtual]

A primitive operation called in a loop until the finish() method stop the loop. You have to override.

Implemented in GameContext.

Here is the caller graph for this function:

virtual void Game::doPostProcess (  )  [inline, protected, virtual]

A hook operation called after game loop ends. You can override.

Definition at line 24 of file Game.h.

Here is the caller graph for this function:

virtual void Game::doPreProcess (  )  [inline, protected, virtual]

A hook operation called before game loop starts. You can override.

Definition at line 20 of file Game.h.

Here is the caller graph for this function:

void Game::finish (  ) 

A concrete method to stop game loop. Dont override.

Definition at line 16 of file Game.cpp.

Here is the caller graph for this function:

bool Game::run (  ) 

The template method to initialize and start game loop. Dont override.

Definition at line 6 of file Game.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:

Generated on Sat Oct 10 03:29:20 2009 for Hangman by  doxygen 1.6.1