Orxonox: orxonox::HumanPlayer Class Reference

# orxonox::HumanPlayer Class Reference

`#include <src/orxonox/objects/infos/HumanPlayer.h>`

Inheritance diagram for orxonox::HumanPlayer:

List of all members.

## Public Member Functions

virtual void | changedGametype ()
OverlayGroup * | getGametypeHUD () const
const std::string & | getGametypeHUDTemplate () const
OverlayGroup * | getHumanHUD () const
const std::string & | getHumanHUDTemplate () const
float | getPacketLossRatio () const
float | getPing () const
| HumanPlayer (BaseObject *creator)
bool | isInitialized () const
| Returns if the object was initialized (passed the object registration).
void | registerVariables ()
void | setClientID (unsigned int clientID)
void | setConfigValues ()
| Function to collect the SetConfigValue-macro calls.
void | setGametypeHUDTemplate (const std::string &name)
void | setHumanHUDTemplate (const std::string &name)
virtual | ~HumanPlayer ()

## Protected Member Functions

void | configvaluecallback_changedHUDTemplate ()
void | configvaluecallback_changednick ()
void | networkcallback_changednick ()
void | networkcallback_client_initialized ()
void | networkcallback_clientIDchanged ()
void | networkcallback_server_initialized ()
void | updateGametypeHUD ()
void | updateHumanHUD ()

## Protected Attributes

bool | client_initialized_
OverlayGroup * | gametypeHud_
std::string | gametypeHudTemplate_
std::string | hudtemplate_
OverlayGroup * | humanHud_
std::string | humanHudTemplate_
std::string | nick_
bool | server_initialized_
std::string | synchronize_nick_

## Constructor & Destructor Documentation

orxonox::HumanPlayer::HumanPlayer | ( | BaseObject * | creator | ) |

References orxonox::PlayerInfo::bHumanPlayer_, Class, client_initialized_, orxonox::PlayerInfo::defaultController_, gametypeHud_, humanHud_, orxonox::GameMode::isMaster(), RegisterObject, registerVariables(), server_initialized_, and setConfigValues().

orxonox::HumanPlayer::~HumanPlayer | ( |  | ) | `[virtual]`

References gametypeHud_, humanHud_, and orxonox::BaseObject::isInitialized().

## Member Function Documentation

void orxonox::HumanPlayer::changedGametype | ( |  | ) | `[virtual]`

Reimplemented from orxonox::PlayerInfo.

References orxonox::PlayerInfo::changedGametype(), orxonox::BaseObject::getGametype(), isInitialized(), orxonox::PlayerInfo::isLocalPlayer(), and setGametypeHUDTemplate().

void orxonox::HumanPlayer::configvaluecallback_changedHUDTemplate | ( |  | ) | `[protected]`

References hudtemplate_, and setHumanHUDTemplate().

Referenced by setConfigValues().

void orxonox::HumanPlayer::configvaluecallback_changednick | ( |  | ) | `[protected]`

References orxonox::PlayerInfo::isLocalPlayer(), orxonox::GameMode::isMaster(), nick_, orxonox::BaseObject::setName(), and synchronize_nick_.

Referenced by setConfigValues().

OverlayGroup* orxonox::HumanPlayer::getGametypeHUD | ( |  | ) | const`[inline]`

const std::string& orxonox::HumanPlayer::getGametypeHUDTemplate | ( |  | ) | const`[inline]`

OverlayGroup* orxonox::HumanPlayer::getHumanHUD | ( |  | ) | const`[inline]`

const std::string& orxonox::HumanPlayer::getHumanHUDTemplate | ( |  | ) | const`[inline]`

float orxonox::HumanPlayer::getPacketLossRatio | ( |  | ) | const`[virtual]`

Implements orxonox::PlayerInfo.

References orxonox::ClientInformation::findClient(), orxonox::PlayerInfo::getClientID(), and orxonox::ClientInformation::getPacketLoss().

float orxonox::HumanPlayer::getPing | ( |  | ) | const`[virtual]`

Implements orxonox::PlayerInfo.

References orxonox::ClientInformation::findClient(), orxonox::PlayerInfo::getClientID(), and orxonox::ClientInformation::getRTT().

bool orxonox::HumanPlayer::isInitialized | ( |  | ) | const`[virtual]`

Returns if the object was initialized (passed the object registration).

Returns:
  True was the object is initialized

Implements orxonox::PlayerInfo.

References client_initialized_, and server_initialized_.

Referenced by changedGametype().

void orxonox::HumanPlayer::networkcallback_changednick | ( |  | ) | `[protected]`

References orxonox::BaseObject::setName(), and synchronize_nick_.

Referenced by registerVariables().

void orxonox::HumanPlayer::networkcallback_client_initialized | ( |  | ) | `[protected]`

References orxonox::BaseObject::getGametype(), and orxonox::Gametype::playerEntered().

Referenced by registerVariables().

void orxonox::HumanPlayer::networkcallback_clientIDchanged | ( |  | ) | `[protected]`

References orxonox::ObjectDirection::Bidirectional, orxonox::PlayerInfo::bLocalPlayer_, client_initialized_, orxonox::PlayerInfo::clientID_, orxonox::PlayerInfo::createController(), orxonox::Host::getPlayerID(), orxonox::GameMode::isMaster(), nick_, orxonox::BaseObject::setName(), orxonox::Synchronisable::setObjectMode(), synchronize_nick_, and updateHumanHUD().

Referenced by registerVariables(), and setClientID().

void orxonox::HumanPlayer::networkcallback_server_initialized | ( |  | ) | `[protected]`

References client_initialized_.

Referenced by registerVariables().

void orxonox::HumanPlayer::registerVariables | ( |  | ) |

Reimplemented from orxonox::PlayerInfo.

References client_initialized_, orxonox::PlayerInfo::clientID_, networkcallback_changednick(), networkcallback_client_initialized(), networkcallback_clientIDchanged(), networkcallback_server_initialized(), orxonox::Synchronisable::registerVariable(), server_initialized_, synchronize_nick_, orxonox::VariableDirection::ToClient, and orxonox::VariableDirection::ToServer.

Referenced by HumanPlayer().

void orxonox::HumanPlayer::setClientID | ( | unsigned int | clientID | ) |

References orxonox::PlayerInfo::clientID_, and networkcallback_clientIDchanged().

Referenced by orxonox::PlayerManager::clientConnected().

void orxonox::HumanPlayer::setConfigValues | ( |  | ) |

Function to collect the SetConfigValue-macro calls.

Reimplemented from orxonox::OrxonoxClass.

References configvaluecallback_changedHUDTemplate(), configvaluecallback_changednick(), hudtemplate_, nick_, and SetConfigValue.

Referenced by HumanPlayer().

void orxonox::HumanPlayer::setGametypeHUDTemplate | ( | const std::string & | name | ) | `[inline]`

Referenced by changedGametype().

void orxonox::HumanPlayer::setHumanHUDTemplate | ( | const std::string & | name | ) | `[inline]`

Referenced by configvaluecallback_changedHUDTemplate().

void orxonox::HumanPlayer::updateGametypeHUD | ( |  | ) | `[protected]`

References orxonox::BaseObject::addTemplate(), gametypeHud_, gametypeHudTemplate_, orxonox::PlayerInfo::isLocalPlayer(), and orxonox::OverlayGroup::setOwner().

void orxonox::HumanPlayer::updateHumanHUD | ( |  | ) | `[protected]`

References orxonox::BaseObject::addTemplate(), humanHud_, humanHudTemplate_, orxonox::PlayerInfo::isLocalPlayer(), and orxonox::OverlayGroup::setOwner().

Referenced by networkcallback_clientIDchanged().

## Member Data Documentation

bool orxonox::HumanPlayer::client_initialized_`[protected]`

Referenced by HumanPlayer(), isInitialized(), networkcallback_clientIDchanged(), networkcallback_server_initialized(), and registerVariables().

OverlayGroup* orxonox::HumanPlayer::gametypeHud_`[protected]`

Referenced by HumanPlayer(), updateGametypeHUD(), and ~HumanPlayer().

std::string orxonox::HumanPlayer::gametypeHudTemplate_`[protected]`

Referenced by updateGametypeHUD().

std::string orxonox::HumanPlayer::hudtemplate_`[protected]`

Referenced by configvaluecallback_changedHUDTemplate(), and setConfigValues().

OverlayGroup* orxonox::HumanPlayer::humanHud_`[protected]`

Referenced by HumanPlayer(), updateHumanHUD(), and ~HumanPlayer().

std::string orxonox::HumanPlayer::humanHudTemplate_`[protected]`

Referenced by updateHumanHUD().

std::string orxonox::HumanPlayer::nick_`[protected]`

Referenced by configvaluecallback_changednick(), networkcallback_clientIDchanged(), and setConfigValues().

bool orxonox::HumanPlayer::server_initialized_`[protected]`

Referenced by HumanPlayer(), isInitialized(), and registerVariables().

std::string orxonox::HumanPlayer::synchronize_nick_`[protected]`

Referenced by configvaluecallback_changednick(), networkcallback_changednick(), networkcallback_clientIDchanged(), and registerVariables().

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

- src/orxonox/objects/infos/HumanPlayer.h
- src/orxonox/objects/infos/HumanPlayer.cc