Orxonox: orxonox::GSDedicated Class Reference

# orxonox::GSDedicated Class Reference

`#include <src/orxonox/gamestates/GSDedicated.h>`

Inheritance diagram for orxonox::GSDedicated:

List of all members.

## Public Member Functions

void | activate ()
void | deactivate ()
| GSDedicated (const GameStateConstrParams &params)
void | update (const Clock &time)
| ~GSDedicated ()

## Private Member Functions

void | deleteCharacter (unsigned int position)
void | inputThread ()
void | insertCharacter (unsigned int position, char c)
void | printLine ()
void | processQueue ()
void | setTerminalMode ()

## Static Private Member Functions

static void | resetTerminalMode ()

## Private Attributes

bool | cleanLine_
bool | closeThread_
unsigned char * | commandLine_
std::queue< std::string > | commandQueue_
unsigned int | cursorX_
unsigned int | cursorY_
unsigned int | inputIterator_
boost::recursive_mutex | inputLineMutex_
boost::recursive_mutex | inputQueueMutex_
boost::thread * | inputThread_
Server * | server_

## Static Private Attributes

static termios * | originalTerminalSettings_

## Constructor & Destructor Documentation

orxonox::GSDedicated::GSDedicated | ( | const GameStateConstrParams & | params | ) |

orxonox::GSDedicated::~GSDedicated | ( |  | ) |

## Member Function Documentation

void orxonox::GSDedicated::activate | ( |  | ) | `[virtual]`

Reimplemented from orxonox::GameState.

References COUT, orxonox::CommandLine::getValue(), inputThread(), inputThread_, orxonox::Server::open(), originalTerminalSettings_, server_, orxonox::GameMode::setHasServer(), and setTerminalMode().

void orxonox::GSDedicated::deactivate | ( |  | ) | `[virtual]`

Reimplemented from orxonox::GameState.

References orxonox::Server::close(), closeThread_, COUT, inputThread_, originalTerminalSettings_, resetTerminalMode(), server_, and orxonox::GameMode::setHasServer().

void orxonox::GSDedicated::deleteCharacter | ( | unsigned int | position | ) | `[private]`

References commandLine_, cursorX_, and inputIterator_.

Referenced by inputThread().

void orxonox::GSDedicated::inputThread | ( |  | ) | `[private]`

References cleanLine_, closeThread_, commandLine_, commandQueue_, orxonox::CommandExecutor::complete(), cursorX_, cursorY_, deleteCharacter(), orxonox::CommandExecutor::hint(), inputIterator_, inputLineMutex_, inputQueueMutex_, insertCharacter(), and orxonox::MAX_COMMAND_LENGTH.

Referenced by activate().

void orxonox::GSDedicated::insertCharacter | ( | unsigned int | position,
|  | char | c |
| ) |  |  | `[private]`

References commandLine_, cursorX_, inputIterator_, and orxonox::MAX_COMMAND_LENGTH.

Referenced by inputThread().

void orxonox::GSDedicated::printLine | ( |  | ) | `[private]`

References commandLine_, cursorX_, orxonox::Game::getAvgFPS(), orxonox::Game::getAvgTickTime(), orxonox::Game::getInstance(), and inputIterator_.

Referenced by update().

void orxonox::GSDedicated::processQueue | ( |  | ) | `[private]`

References commandQueue_, orxonox::CommandExecutor::execute(), and inputQueueMutex_.

Referenced by update().

void orxonox::GSDedicated::resetTerminalMode | ( |  | ) | `[static, private]`

References originalTerminalSettings_.

Referenced by deactivate().

void orxonox::GSDedicated::setTerminalMode | ( |  | ) | `[private]`

References COUT, and originalTerminalSettings_.

Referenced by activate().

void orxonox::GSDedicated::update | ( | const Clock & | time | ) | `[virtual]`

Reimplemented from orxonox::GameState.

References printLine(), processQueue(), server_, and orxonox::Server::update().

## Member Data Documentation

bool orxonox::GSDedicated::cleanLine_`[private]`

Referenced by inputThread().

bool orxonox::GSDedicated::closeThread_`[private]`

Referenced by deactivate(), and inputThread().

unsigned char* orxonox::GSDedicated::commandLine_`[private]`

Referenced by deleteCharacter(), inputThread(), insertCharacter(), and printLine().

std::queue<std::string> orxonox::GSDedicated::commandQueue_`[private]`

Referenced by inputThread(), and processQueue().

unsigned int orxonox::GSDedicated::cursorX_`[private]`

Referenced by deleteCharacter(), inputThread(), insertCharacter(), and printLine().

unsigned int orxonox::GSDedicated::cursorY_`[private]`

Referenced by inputThread().

unsigned int orxonox::GSDedicated::inputIterator_`[private]`

Referenced by deleteCharacter(), inputThread(), insertCharacter(), and printLine().

boost::recursive_mutex orxonox::GSDedicated::inputLineMutex_`[private]`

Referenced by inputThread().

boost::recursive_mutex orxonox::GSDedicated::inputQueueMutex_`[private]`

Referenced by inputThread(), and processQueue().

boost::thread* orxonox::GSDedicated::inputThread_`[private]`

Referenced by activate(), and deactivate().

termios * orxonox::GSDedicated::originalTerminalSettings_`[static, private]`

Referenced by activate(), deactivate(), resetTerminalMode(), and setTerminalMode().

Server* orxonox::GSDedicated::server_`[private]`

Referenced by activate(), deactivate(), and update().

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

- src/orxonox/gamestates/GSDedicated.h
- src/orxonox/gamestates/GSDedicated.cc