Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GameControlData Class Reference

Encapsulates the RoboCupGameControlData struct for the GT2003 project. More...

#include <GameControlData.h>

List of all members.

Public Member Functions

 GameControlData ()
 Constructor.

void translateFromGlobalGameControlData (const GlobalGameControlData &globalGameControlData, Player &player)
 Translates a GlobalGameControlData to GameControlData.

bool operator== (const GameControlData &other)
 the == operator

bool operator!= (const GameControlData &other)
 the != operator


Static Public Member Functions

const char * getStateName (RState state)
 returns the name of the state

const char * getKickoffName (RKickOff kickoff)
 returns the name for the variable kickoff

const char * getTeamColorName (RTeamColor teamColor)
 returns the name of the team color

const char * getPenaltyName (RPenalty penalty)
 returns the name of the current penalty


Public Attributes

RoboCupGameControlData data
 an instance of RoboCupGameControlData

unsigned long timeStamp
 The timestamp when the last request was received.


Detailed Description

Encapsulates the RoboCupGameControlData struct for the GT2003 project.

Author:
Martin Loetzsch

Definition at line 92 of file GameControlData.h.


Constructor & Destructor Documentation

GameControlData::GameControlData  ) 
 

Constructor.

Definition at line 35 of file GameControlData.cpp.

References getPlayer(), and Player::getTeamColor().

Here is the call graph for this function:


Member Function Documentation

const char* GameControlData::getStateName RState  state  )  [inline, static]
 

returns the name of the state

Definition at line 110 of file GameControlData.h.

const char* GameControlData::getKickoffName RKickOff  kickoff  )  [inline, static]
 

returns the name for the variable kickoff

Definition at line 125 of file GameControlData.h.

const char* GameControlData::getTeamColorName RTeamColor  teamColor  )  [inline, static]
 

returns the name of the team color

Definition at line 137 of file GameControlData.h.

const char* GameControlData::getPenaltyName RPenalty  penalty  )  [inline, static]
 

returns the name of the current penalty

Definition at line 148 of file GameControlData.h.

void GameControlData::translateFromGlobalGameControlData const GlobalGameControlData globalGameControlData,
Player player
 

Translates a GlobalGameControlData to GameControlData.

Parameters:
globalGameControlData The global game state
player This player

Definition at line 53 of file GameControlData.cpp.

References GlobalGameControlData::blueScore, SystemCall::getCurrentSystemTime(), Player::getPlayerNumber(), Player::getTeamColor(), GlobalGameControlData::kickoff, GlobalGameControlData::penaltiesBlueTeam, GlobalGameControlData::penaltiesRedTeam, GlobalGameControlData::redScore, and GlobalGameControlData::state.

Here is the call graph for this function:

bool GameControlData::operator== const GameControlData other  ) 
 

the == operator

Definition at line 100 of file GameControlData.cpp.

References data.

bool GameControlData::operator!= const GameControlData other  )  [inline]
 

the != operator

Definition at line 176 of file GameControlData.h.


Member Data Documentation

RoboCupGameControlData GameControlData::data
 

an instance of RoboCupGameControlData

Definition at line 101 of file GameControlData.h.

Referenced by RoboCupGameManagerSymbols::getKickoff(), RoboCupGameManagerSymbols::getOpponentScore(), RoboCupGameManagerSymbols::getOwnScore(), RoboCupGameManagerSymbols::getState(), operator<<(), operator==(), operator>>(), DefaultOptionRating::rateOptions(), GT2004ConfigurationSymbols::update(), and RoboCupGameManagerSymbols::update().

unsigned long GameControlData::timeStamp
 

The timestamp when the last request was received.

Note that this value is set in the In streaming operator.

Definition at line 107 of file GameControlData.h.

Referenced by RoboCupGameManagerSymbols::getTimeSinceLastMessage(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:06:20 2004 for GT2004 by doxygen 1.3.6