Orxonox  0.0.5 Codename: Arcturus
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | Friends | List of all members
orxonox::GameMode Class Reference

Helper class, stores and returns the current mode of the game. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/GameMode.h>

Static Public Member Functions

static bool isClient ()
 Returns true if we're currently a client (online) More...
 
static bool isMaster ()
 Returns true if we're in control of the game (either standalone or server) More...
 
static bool isServer ()
 Returns true if we're currently a server (online) More...
 
static bool isStandalone ()
 Returns true if we're in standalone mode (offline) More...
 
static bool playsSound ()
 Returns true if the game is able to play sounds. More...
 
static void setIsClient (bool val)
 Defines if the program is in client mode (online) More...
 
static void setIsServer (bool val)
 Defines if the program is in server mode (online) More...
 
static void setIsStandalone (bool val)
 Defines if the program is in standalone mode (offline) More...
 
static void setPlaysSound (bool val)
 Defines if the game can play sounds. More...
 
static bool showsGraphics ()
 Returns true if the game shows graphics, false if it is in text-console mode. More...
 

Private Member Functions

 GameMode ()=delete
 
 GameMode (const GameMode &)=delete
 
 ~GameMode ()=delete
 
GameModeoperator= (const GameMode &)=delete
 

Static Private Member Functions

static void updateIsMaster ()
 Checks if we're in control of the game (either standalone or server). More...
 

Static Private Attributes

static bool bIsClient_s = false
 global variable that tells whether this is a client (online) More...
 
static bool bIsMaster_s = false
 global variable that tells whether we're in control of the game (standalone or server) More...
 
static bool bIsServer_s = false
 global variable that tells whether this is a server (online) More...
 
static bool bIsStandalone_s = false
 global variable that tells whether the game is running in standalone mode (offline) More...
 
static bool bPlaysSound_s = false
 global variable that tells whether to sound works More...
 
static bool bShowsGraphics_s = false
 global variable that tells whether to show graphics More...
 

Friends

class Core
 

Detailed Description

Helper class, stores and returns the current mode of the game.

Constructor & Destructor Documentation

orxonox::GameMode::GameMode ( )
privatedelete
orxonox::GameMode::GameMode ( const GameMode )
privatedelete
orxonox::GameMode::~GameMode ( )
privatedelete

Member Function Documentation

static bool orxonox::GameMode::isClient ( )
inlinestatic

Returns true if we're currently a client (online)

static bool orxonox::GameMode::isMaster ( )
inlinestatic

Returns true if we're in control of the game (either standalone or server)

static bool orxonox::GameMode::isServer ( )
inlinestatic

Returns true if we're currently a server (online)

static bool orxonox::GameMode::isStandalone ( )
inlinestatic

Returns true if we're in standalone mode (offline)

GameMode& orxonox::GameMode::operator= ( const GameMode )
privatedelete
static bool orxonox::GameMode::playsSound ( )
inlinestatic

Returns true if the game is able to play sounds.

static void orxonox::GameMode::setIsClient ( bool  val)
inlinestatic

Defines if the program is in client mode (online)

static void orxonox::GameMode::setIsServer ( bool  val)
inlinestatic

Defines if the program is in server mode (online)

static void orxonox::GameMode::setIsStandalone ( bool  val)
inlinestatic

Defines if the program is in standalone mode (offline)

static void orxonox::GameMode::setPlaysSound ( bool  val)
inlinestatic

Defines if the game can play sounds.

static bool orxonox::GameMode::showsGraphics ( )
inlinestatic

Returns true if the game shows graphics, false if it is in text-console mode.

static void orxonox::GameMode::updateIsMaster ( )
inlinestaticprivate

Checks if we're in control of the game (either standalone or server).

Friends And Related Function Documentation

friend class Core
friend

Member Data Documentation

bool orxonox::GameMode::bIsClient_s = false
staticprivate

global variable that tells whether this is a client (online)

bool orxonox::GameMode::bIsMaster_s = false
staticprivate

global variable that tells whether we're in control of the game (standalone or server)

bool orxonox::GameMode::bIsServer_s = false
staticprivate

global variable that tells whether this is a server (online)

bool orxonox::GameMode::bIsStandalone_s = false
staticprivate

global variable that tells whether the game is running in standalone mode (offline)

bool orxonox::GameMode::bPlaysSound_s = false
staticprivate

global variable that tells whether to sound works

bool orxonox::GameMode::bShowsGraphics_s = false
staticprivate

global variable that tells whether to show graphics


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