GameFactory Class Reference

#include <game_factory.h>


Detailed Description

This class is the entry point to create Game objects, either directly or using command-line parameters.

It also offers a method to destroy Game objects. This class implements the Singleton pattern.

Definition at line 35 of file game_factory.h.

Public Member Functions

TrainingcreateTraining (const Dictionary &iDic)
FreeGamecreateFreeGame (const Dictionary &iDic)
DuplicatecreateDuplicate (const Dictionary &iDic)
GamecreateFromCmdLine (int argc, char **argv)
void releaseGame (Game &iGame)
 Destroy a Game object, created by any of the createXXX methods above.

Static Public Member Functions

static GameFactoryInstance ()
static void Destroy ()


Member Function Documentation

Duplicate * GameFactory::createDuplicate const Dictionary iDic  ) 
 

Definition at line 72 of file game_factory.cpp.

Referenced by createFromCmdLine(), Game::gameLoadFormat_15(), and main_loop().

FreeGame * GameFactory::createFreeGame const Dictionary iDic  ) 
 

Definition at line 65 of file game_factory.cpp.

Referenced by createFromCmdLine(), Game::gameLoadFormat_15(), and main_loop().

Game * GameFactory::createFromCmdLine int  argc,
char **  argv
 

Definition at line 79 of file game_factory.cpp.

References Game::addAIPlayer(), Game::addHumanPlayer(), createDuplicate(), createFreeGame(), createTraining(), Dic_load(), Game::kJOKER, and Game::setVariant().

Referenced by main().

Training * GameFactory::createTraining const Dictionary iDic  ) 
 

Definition at line 58 of file game_factory.cpp.

Referenced by createFromCmdLine(), EVT_TEXT_ENTER(), Game::gameLoadFormat_14(), Game::gameLoadFormat_15(), main_loop(), and MainFrame::OnMenuGameNew().

void GameFactory::Destroy  )  [static]
 

Definition at line 50 of file game_factory.cpp.

Referenced by main(), and EliotApp::OnExit().

GameFactory * GameFactory::Instance  )  [static]
 

Definition at line 42 of file game_factory.cpp.

Referenced by EVT_TEXT_ENTER(), Game::gameLoadFormat_14(), Game::gameLoadFormat_15(), main(), main_loop(), MainFrame::OnMenuGameNew(), MainFrame::OnMenuGameOpen(), CursesIntf::~CursesIntf(), and MainFrame::~MainFrame().

void GameFactory::releaseGame Game iGame  ) 
 

Destroy a Game object, created by any of the createXXX methods above.

Definition at line 188 of file game_factory.cpp.

Referenced by main_loop(), MainFrame::OnMenuGameNew(), MainFrame::OnMenuGameOpen(), CursesIntf::~CursesIntf(), and MainFrame::~MainFrame().


The documentation for this class was generated from the following files:
Generated on Thu Dec 29 02:01:15 2005 for Eliot by  doxygen 1.4.5