orxonox::Game Class Reference

Main class responsible for running the game. More...

#include <src/core/Game.h>

List of all members.

Public Member Functions

void addTickTime (uint32_t length)
 Game (int argc, char **argv)
 Non-initialising constructor.
float getAvgFPS ()
float getAvgTickTime ()
const ClockgetGameClock ()
GameStategetState (const std::string &name)
void popState ()
void requestState (const std::string &name)
void requestStates (const std::string &names)
void run ()
 Main loop of the orxonox game.
void setStateHierarchy (const std::string &str)
void stop ()
 ~Game ()

Static Public Member Functions

template<class T>
static bool declareGameState (const std::string &className, const std::string &stateName, bool bIgnoreTickTime, bool bConsoleMode)
static GamegetInstance ()

Private Member Functions

 Game (Game &)
void loadState (GameState *state)
void unloadState (GameState *state)

Private Attributes

boost::shared_ptr
< GameStateTreeNode
activeStateNode_
std::vector< GameState * > activeStates_
float avgFPS_
float avgTickTime_
bool bAbort_
bool bChangingState_
GameConfigurationconfiguration_
Corecore_
ClockgameClock_
std::map< std::string,
GameState * > 
gameStates_
uint32_t periodTickTime_
uint32_t periodTime_
std::vector< boost::shared_ptr
< GameStateTreeNode > > 
requestedStateNodes_
boost::shared_ptr
< GameStateTreeNode
rootStateNode_
uint64_t statisticsStartTime_
std::list< StatisticsTickInfostatisticsTickTimes_

Static Private Attributes

static std::map< std::string,
GameStateInfo
gameStateDeclarations_s
static GamesingletonRef_s = 0
 Pointer to the Singleton.

Classes

class  GameStateFactory
struct  GameStateInfo
struct  StatisticsTickInfo
class  TemplateGameStateFactory


Detailed Description

Main class responsible for running the game.

Constructor & Destructor Documentation

orxonox::Game::Game ( int  argc,
char **  argv 
)

orxonox::Game::~Game (  ) 

orxonox::Game::Game ( Game  )  [private]


Member Function Documentation

void orxonox::Game::addTickTime ( uint32_t  length  ) 

template<class T>
bool orxonox::Game::declareGameState ( const std::string className,
const std::string stateName,
bool  bIgnoreTickTime,
bool  bConsoleMode 
) [inline, static]

float orxonox::Game::getAvgFPS (  )  [inline]

float orxonox::Game::getAvgTickTime (  )  [inline]

const Clock& orxonox::Game::getGameClock (  )  [inline]

static Game& orxonox::Game::getInstance (  )  [inline, static]

GameState * orxonox::Game::getState ( const std::string name  ) 

void orxonox::Game::loadState ( GameState state  )  [private]

void orxonox::Game::popState (  ) 

void orxonox::Game::requestState ( const std::string name  ) 

void orxonox::Game::requestStates ( const std::string names  ) 

void orxonox::Game::run (  ) 

void orxonox::Game::setStateHierarchy ( const std::string str  ) 

void orxonox::Game::stop (  ) 

void orxonox::Game::unloadState ( orxonox::GameState state  )  [private]


Member Data Documentation

boost::shared_ptr<GameStateTreeNode> orxonox::Game::activeStateNode_ [private]

Referenced by Game(), popState(), requestState(), and run().

std::vector<GameState*> orxonox::Game::activeStates_ [private]

Referenced by Game(), loadState(), run(), and unloadState().

float orxonox::Game::avgFPS_ [private]

Referenced by Game(), and run().

float orxonox::Game::avgTickTime_ [private]

Referenced by Game(), and run().

bool orxonox::Game::bAbort_ [private]

Referenced by Game(), run(), and stop().

Referenced by Game(), loadState(), and unloadState().

Referenced by Game(), run(), and ~Game().

Referenced by Game(), and run().

Referenced by Game(), and run().

Referenced by declareGameState(), and Game().

Referenced by Game(), getState(), and ~Game().

uint32_t orxonox::Game::periodTickTime_ [private]

Referenced by addTickTime(), Game(), and run().

uint32_t orxonox::Game::periodTime_ [private]

Referenced by Game(), and run().

std::vector<boost::shared_ptr<GameStateTreeNode> > orxonox::Game::requestedStateNodes_ [private]

Referenced by popState(), requestState(), and run().

boost::shared_ptr<GameStateTreeNode> orxonox::Game::rootStateNode_ [private]

Referenced by Game(), popState(), run(), and setStateHierarchy().

Game * orxonox::Game::singletonRef_s = 0 [static, private]

Pointer to the Singleton.

Referenced by Game().

Referenced by Game().

Referenced by addTickTime(), Game(), and run().


The documentation for this class was generated from the following files:

Generated on Tue Jul 28 16:22:30 2009 for Orxonox by  doxygen 1.5.6