#include <game.h>
Inheritance diagram for TGame:
Public Methods | |
void | addPlayer (TPlayer *player) |
void | addRace (TRace *race) |
const string & | getGameDirectory () const |
const string & | getGameName () const |
const list< TPlayer *> & | getPlayers () const |
const list< TRace *> & | getRaces () const |
int4 | getTurn () const |
virtual void | resetAll () |
bool | saveServerMasterFile () const |
void | setGameName (const string &name) |
void | setTurn (int4 turn) |
Protected Types | |
typedef void(TGame::* | tPDBFunc )(TDataPackageList *block) |
Protected Methods | |
TGame (const string &gameDir, const string &gameName="") | |
virtual | ~TGame () |
string | FNamePlayerData (const string &PlayerName) const |
string | FNamePlayerOrder (const string &PlayerName) const |
string | FNameServerMaster () const |
string | FNameUniverseDefinition () const |
string | FSpecPlayerData (const string &playerName) const |
string | FSpecPlayerOrder (const string &playerName) const |
string | FSpecServerMaster () const |
string | FSpecUniverseDefinition () const |
string | getBlockType (TDataPackageList *list) const |
virtual void | PDBAction (TDataPackageList *) |
virtual void | PDBFleet (TDataPackageList *) |
virtual void | PDBGalaxy (TDataPackageList *) |
virtual void | PDBGame (TDataPackageList *) |
void | PDBItem (TDataPackageList *block) |
virtual void | PDBLoadOrders (TDataPackageList *) |
void | PDBPlayer (TDataPackageList *block) |
void | PDBRace (TDataPackageList *block) |
void | PDBRuleSystem (TDataPackageList *block) |
virtual void | PDBSystem (TDataPackageList *) |
void | processDataBlock (TDataPackageList *block) |
void | resetLoadLevel () |
Protected Attributes | |
list< tTransition > | fTransitions |
TLink< TRace > | fIluvatar |
Private Attributes | |
int2 | fLoadLevel |
string | fGameDirectory |
string | fGameName |
int4 | fCurrentTurn |
TPList< TRace > | fRaces |
TPList< TPlayer > | fPlayers |
Friends | |
int | yyparse () |
This class handles all administration specific things blabla FIXME
|
Type definition to one of the PDBFunctions. |
|
Initializes the member variables (e.g. sets fRaces, fPlayers to the autodelete mode to
|
|
Calls removeAll. |
|
Adds a player to the game. Note that the player is now under control of TGame in the sense that TGame will take care of deleting the object.
|
|
Adds a race to the game. Note that the race is now under control of TGame in the sense that TGame will take care of deleting the object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only needed as an interface. This method is implemented in TGameCreate. Reimplemented in TGameSC. |
|
Only needed as an interface. This method is implemented in TGameCS. Reimplemented in TGameSC. |
|
Only needed as an interface. This method is implemented in TGameCS. Reimplemented in TGameSC. |
|
Only needed as an interface. This method is implemented in TGameCS and TGameCreate. Reimplemented in TGameCreate, and TGameSC. |
|
FIXME |
|
Only needed as an interface. This method is implemented in TGameCS. Reimplemented in TGameClient, and TGameServer. |
|
FIXME |
|
FIXME |
|
FIXME |
|
Only needed as an interface. This method is implemented in TGameCS. Reimplemented in TGameSC. |
|
Processes a list of data packages. This method is called by the parser and the main task of this method is to change the load level and call the right method out of the PDB_XXX set.
|
|
Resets everything (e.g. TUniverse, TLinkUpdate, TRuleSystem ...). Use with care!!! |
|
Resets the variable fLoadLevel to 0. |
|
Saves the full game database to disk.
|
|
Sets the name of the game (fGameName).
|
|
Sets the current turn.
|
|
This function invokes the ProcessDataBlock calls. |
|
Current turn being played. |
|
Game directory: all game files reside in this directory and filenames are built with standard names based from this path |
|
The Name of the game. |
|
The creator and owner of almost everything (planets, systems, ...). |
|
This counter is needed to force a certain order during the load process. For instance in the server mode the first thing to read is the rule system. |
|
Players in the game (may be less than Races - one player may control multiple races). This list is a TPList with autodelete set to |
|
Races in the game. This list is a TPList with autodelete set to |
|
ProcessDataBlock DFA state transition table. This contains some information about the structure of the file which is going to be loaded. |