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

TGameSC Class Reference

Class which provides methods which are useful for the client as well as the server. More...

#include <game-sc.h>

Inheritance diagram for TGameSC:

Inheritance graph
[legend]
Collaboration diagram for TGameSC:

Collaboration graph
[legend]
List of all members.

Public Methods

TPlayer * getActivePlayer () const
bool loadPlayerOrderFile (const string &playerName)
bool loadServerMasterFile ()
bool recordPlayerAction (TAction *action)

Protected Methods

 TGameSC (bool actSeq, const string &gameDir, const string &gameName="")
virtual void PDBAction (TDataPackageList *block)
virtual void PDBFleet (TDataPackageList *block)
virtual void PDBGalaxy (TDataPackageList *block)
virtual void PDBGame (TDataPackageList *block)
virtual void PDBSystem (TDataPackageList *block)
void setActivePlayer (TPlayer *player)

Protected Attributes

TActionSequencer fActionSequencer

Private Attributes

TPlayer * fActivePlayer

Detailed Description

Class which provides methods which are useful for the client as well as the server.

Author:
Alberto Barsella <> Marco Krohn <marco.krohn@gmx.de>
Version:
Id:
game-sc.h,v 1.3 2002/05/13 22:57:25 mkrohn5 Exp

FIXME


Constructor & Destructor Documentation

TGameSC::TGameSC bool    actSeq,
const string &    gameDir,
const string &    gameName = ""
[protected]
 

Empty constructor.

Parameters:
actSeq  The mode you want to start TActionSequencer with. see TActionSequencer::RecordMode for details.
gameDir  The path to the game directory.
gameName  The name of the game.


Member Function Documentation

TPlayer* TGameSC::getActivePlayer   const
 

Returns:
The currently active player.

bool TGameSC::loadPlayerOrderFile const string &    playerName
 

Loads the player order file.

Parameters:
playerName  The name of the player which order file is going to be loaded.
Returns:
true if the file was loaded successfully, otherwise false.

bool TGameSC::loadServerMasterFile  
 

Loads the server master file. Note: never try to load a server master file, if a game is still present. The correct way is to delete the old game completely by calling resetAll().

Returns:
true if the file was loaded successfully, otherwise false.

virtual void TGameSC::PDBAction TDataPackageList   block [protected, virtual]
 

Creates an action and asks it to load the data package list.

Parameters:
block  A list of datapackages which contains information about the action.

Reimplemented from TGame.

virtual void TGameSC::PDBFleet TDataPackageList   block [protected, virtual]
 

Creates a fleet and asks it to load the data package list.

Parameters:
block  A list of datapackages which contains information about the fleet.

Reimplemented from TGame.

virtual void TGameSC::PDBGalaxy TDataPackageList   block [protected, virtual]
 

Creates a galaxy and asks it to load the data package list.

Parameters:
block  A list of datapackages which contains information about the galaxy.

Reimplemented from TGame.

virtual void TGameSC::PDBGame TDataPackageList   block [protected, virtual]
 

Loads and sets values such as game name and current turn.

Parameters:
block  A list of datapackages which contains information about the game.

Reimplemented from TGame.

virtual void TGameSC::PDBSystem TDataPackageList   block [protected, virtual]
 

Creates a system and asks it to load the data package list.

Parameters:
block  A list of datapackages which contains information about the system.

Reimplemented from TGame.

bool TGameSC::recordPlayerAction TAction   action
 

Record an action from a player.

Parameters:
action  The action to add to the action sequencer.

void TGameSC::setActivePlayer TPlayer *    player [protected]
 

Sets the active player (see fActivePlayer).

Parameters:
player  The new active player.


Member Data Documentation

TActionSequencer TGameSC::fActionSequencer [protected]
 

Action sequencer used in client mode when recording the player actions or by the server when loading the player orders.

TPlayer* TGameSC::fActivePlayer [private]
 

Link to the active player (either the player playing the turn or the player whose order file is being loaded)


The documentation for this class was generated from the following file:
Generated on Thu Jun 20 18:13:23 2002 for Stellar Legacy by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001