Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

GameStateItem Class Reference

#include <gamestateitem.h>

Inheritance diagram for GameStateItem:

Inheritance graph
[legend]
Collaboration diagram for GameStateItem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GameStateItem ()
virtual ~GameStateItem ()
virtual void GetInitialPredicates (oxygen::PredicateList &pList)
 This function is called once for every MonitorSystem each time a new client connects.
virtual void GetPredicates (oxygen::PredicateList &pList)
 This function will be called periodically to append predicates to a list that is sent using the active monitor.
virtual void OnLink ()
 sets the reference to the GameStateAspect
virtual void OnUnlink ()
 resets the reference to the GameStateAspect

Protected Member Functions

void ResetSentFlags ()
void PutFloatParam (const std::string &name, oxygen::PredicateList &pList)
 helper method that queries the ScriptServer for the float variable name and appends a predicate describing it to pList

Protected Attributes

boost::shared_ptr< GameStateAspectmGameState
bool mSentLeftTeamname
 flag if we already sent the left teamname
bool mSentRightTeamname
 flag if we already sent the left teamname
TGameHalf mLastHalf
 the last half sent out to monitors
int mLastLeftScore
 the last left score sent out to monitors
int mLastRightScore
 the last right score sent out to monitors
TPlayMode mLastPlayMode
 the last playmode sent out to monitors
bool mSentFlags
 flag if the monitors received field flags information

Detailed Description

Definition at line 30 of file gamestateitem.h.


Constructor & Destructor Documentation

GameStateItem::GameStateItem  ) 
 

Definition at line 29 of file gamestateitem.cpp.

References ResetSentFlags().

Here is the call graph for this function:

GameStateItem::~GameStateItem  )  [virtual]
 

Definition at line 34 of file gamestateitem.cpp.


Member Function Documentation

void GameStateItem::GetInitialPredicates oxygen::PredicateList pList  )  [virtual]
 

This function is called once for every MonitorSystem each time a new client connects.

It should append predicates to a list that is sent using the active monitor

Implements oxygen::MonitorItem.

Definition at line 62 of file gamestateitem.cpp.

References oxygen::PredicateList::AddPredicate(), zeitgeist::ParameterList::AddValue(), oxygen::Predicate::name, oxygen::Predicate::parameter, SoccerBase::PlayMode2Str(), PM_NONE, PutFloatParam(), and ResetSentFlags().

Here is the call graph for this function:

void GameStateItem::GetPredicates oxygen::PredicateList pList  )  [virtual]
 

This function will be called periodically to append predicates to a list that is sent using the active monitor.

Implements oxygen::MonitorItem.

Definition at line 102 of file gamestateitem.cpp.

References oxygen::PredicateList::AddPredicate(), zeitgeist::ParameterList::AddValue(), mGameState, mLastHalf, mLastLeftScore, mLastPlayMode, mLastRightScore, mSentLeftTeamname, mSentRightTeamname, oxygen::Predicate::name, oxygen::Predicate::parameter, TI_LEFT, and TI_RIGHT.

Here is the call graph for this function:

void GameStateItem::OnLink  )  [virtual]
 

sets the reference to the GameStateAspect

Reimplemented from zeitgeist::Leaf.

Definition at line 179 of file gamestateitem.cpp.

References SoccerBase::GetGameState(), and mGameState.

Here is the call graph for this function:

void GameStateItem::OnUnlink  )  [virtual]
 

resets the reference to the GameStateAspect

Reimplemented from zeitgeist::Leaf.

Definition at line 184 of file gamestateitem.cpp.

References mGameState.

void GameStateItem::PutFloatParam const std::string &  name,
oxygen::PredicateList pList
[protected]
 

helper method that queries the ScriptServer for the float variable name and appends a predicate describing it to pList

Referenced by GetInitialPredicates().

void GameStateItem::ResetSentFlags  )  [protected]
 

Definition at line 38 of file gamestateitem.cpp.

References GH_NONE, mLastHalf, mLastLeftScore, mLastPlayMode, mLastRightScore, mSentFlags, mSentLeftTeamname, mSentRightTeamname, and PM_NONE.

Referenced by GameStateItem(), and GetInitialPredicates().


Member Data Documentation

boost::shared_ptr<GameStateAspect> GameStateItem::mGameState [protected]
 

Definition at line 62 of file gamestateitem.h.

Referenced by GetPredicates(), OnLink(), and OnUnlink().

TGameHalf GameStateItem::mLastHalf [protected]
 

the last half sent out to monitors

Definition at line 71 of file gamestateitem.h.

Referenced by GetPredicates(), and ResetSentFlags().

int GameStateItem::mLastLeftScore [protected]
 

the last left score sent out to monitors

Definition at line 73 of file gamestateitem.h.

Referenced by GetPredicates(), and ResetSentFlags().

TPlayMode GameStateItem::mLastPlayMode [protected]
 

the last playmode sent out to monitors

Definition at line 77 of file gamestateitem.h.

Referenced by GetPredicates(), and ResetSentFlags().

int GameStateItem::mLastRightScore [protected]
 

the last right score sent out to monitors

Definition at line 75 of file gamestateitem.h.

Referenced by GetPredicates(), and ResetSentFlags().

bool GameStateItem::mSentFlags [protected]
 

flag if the monitors received field flags information

Definition at line 79 of file gamestateitem.h.

Referenced by ResetSentFlags().

bool GameStateItem::mSentLeftTeamname [protected]
 

flag if we already sent the left teamname

Definition at line 67 of file gamestateitem.h.

Referenced by GetPredicates(), and ResetSentFlags().

bool GameStateItem::mSentRightTeamname [protected]
 

flag if we already sent the left teamname

Definition at line 69 of file gamestateitem.h.

Referenced by GetPredicates(), and ResetSentFlags().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:38:26 2006 for rcssserver3d by  doxygen 1.4.4