GameFactory Class Reference

#include <gamefactory.h>

Collaboration diagram for GameFactory:

Collaboration graph
[legend]

List of all members.


Detailed Description

This gives us access to all of our games.

Author:
John Schneiderman

Public Member Functions

void clear ()
bool createGame (UserProfileDatabase &profileDatabase, const QString &game, QStackedWidget &layout)
GameBasegame ()
const GameBasegame () const
 GameFactory ()
bool hasGame () const
 ~GameFactory ()

Protected Member Functions

bool setupGame (UserProfileDatabase &profileDatabase, const QString &game, QStackedWidget &layout)

Constructor & Destructor Documentation

GameFactory::GameFactory (  ) 

General constructor.

GameFactory::~GameFactory (  ) 

General destructor.


Member Function Documentation

void GameFactory::clear (  ) 

Clears all of our currently running games.

bool GameFactory::createGame ( UserProfileDatabase profileDatabase,
const QString &  game,
QStackedWidget &  layout 
)

Creates a card game.

Parameters:
profileDatabase is the user profile database.
game is the name of the game we want to create.
Note:
Game names must all be in lowercase.
Parameters:
layout is the layout to add the game to.
Returns:
true if the game was created, false if it was failed to be created.

GameBase & GameFactory::game (  ) 

Accessor to our currently running game.

Returns:
our current running game.
Exceptions:
KardsGTError if you try to access the game before a game has been created.

const GameBase & GameFactory::game (  )  const

Accessor to all of our currently running games.

Returns:
our current running game.
Exceptions:
KardsGTError if you try to access the game before a game has been created.

bool GameFactory::hasGame (  )  const

This tells us if we have a game running.

Returns:
true if we have a game, false if we do not.

bool GameFactory::setupGame ( UserProfileDatabase profileDatabase,
const QString &  game,
QStackedWidget &  layout 
) [protected]

This setups up a game ready to be played and adds it to our game listing.

Parameters:
profileDatabase is the user profile database.
game is the game we want to setup.
layout is the layout to add the game to.
Returns:
true if the game is successfully setup, false if something goes wrong.


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

Generated on Tue Aug 12 23:24:01 2008 for KardsGT by  doxygen 1.5.5