Orxonox: orxonox::GamestateClient Class Reference

# orxonox::GamestateClient Class Reference

`#include <src/network/GamestateClient.h>`

Inheritance diagram for orxonox::GamestateClient:

List of all members.

## Public Member Functions

bool | ack (unsigned int gamestateID, unsigned int clientID)
bool | add (packet::Gamestate *gs, unsigned int clientID)
void | cleanup ()
| GamestateClient ()
packet::Gamestate * | getGamestate ()
bool | processGamestates ()
| ~GamestateClient ()

## Private Member Functions

void | printGamestateMap ()
packet::Gamestate * | processGamestate (packet::Gamestate *gs)
void | removeObject (ObjectListIterator< Synchronisable > &it)
bool | sendAck (unsigned int gamestateID)

## Private Attributes

std::map< unsigned int, packet::Gamestate * > | gamestateMap_
unsigned int | last_diff_
unsigned int | last_gamestate_
packet::Gamestate * | tempGamestate_

## Constructor & Destructor Documentation

orxonox::GamestateClient::GamestateClient | ( |  | ) |

References COUT, orxonox::GAMESTATEID_INITIAL, last_diff_, last_gamestate_, and tempGamestate_.

orxonox::GamestateClient::~GamestateClient | ( |  | ) |

References gamestateMap_, and tempGamestate_.

## Member Function Documentation

bool orxonox::GamestateClient::ack | ( | unsigned int | gamestateID,
|  | unsigned int | clientID |
| ) |  |  | `[virtual]`

Implements orxonox::GamestateHandler.

Referenced by sendAck().

bool orxonox::GamestateClient::add | ( | packet::Gamestate * | gs,
|  | unsigned int | clientID |
| ) |  |  | `[virtual]`

Implements orxonox::GamestateHandler.

References orxonox::packet::Gamestate::getID(), and tempGamestate_.

void orxonox::GamestateClient::cleanup | ( |  | ) |

References gamestateMap_, last_diff_, and tempGamestate_.

Referenced by orxonox::Client::update().

packet::Gamestate * orxonox::GamestateClient::getGamestate | ( |  | ) |

References orxonox::packet::Gamestate::collectData(), and orxonox::packet::Type::Gamestate.

Referenced by orxonox::Client::update().

void orxonox::GamestateClient::printGamestateMap | ( |  | ) | `[private]`

References COUT, and gamestateMap_.

packet::Gamestate * orxonox::GamestateClient::processGamestate | ( | packet::Gamestate * | gs | ) | `[private]`

References COUT, orxonox::packet::Gamestate::decompressData(), gamestateMap_, orxonox::packet::Gamestate::getBaseID(), orxonox::packet::Gamestate::getID(), orxonox::packet::Gamestate::isCompressed(), orxonox::packet::Gamestate::isDiffed(), orxonox::packet::Gamestate::spreadData(), and orxonox::packet::Gamestate::undiff().

Referenced by processGamestates().

bool orxonox::GamestateClient::processGamestates | ( |  | ) |

References orxonox::NetworkCallbackManager::callCallbacks(), orxonox::GAMESTATEID_INITIAL, gamestateMap_, orxonox::packet::Gamestate::getBaseID(), orxonox::packet::Gamestate::getID(), orxonox::packet::Gamestate::isDiffed(), last_diff_, processGamestate(), sendAck(), and tempGamestate_.

Referenced by orxonox::Client::update().

void orxonox::GamestateClient::removeObject | ( | ObjectListIterator< Synchronisable > & | it | ) | `[private]`

bool orxonox::GamestateClient::sendAck | ( | unsigned int | gamestateID | ) | `[private]`

References ack(), orxonox::packet::Type::Acknowledgement, COUT, and orxonox::packet::Packet::send().

Referenced by processGamestates().

## Member Data Documentation

std::map<unsigned int, packet::Gamestate *> orxonox::GamestateClient::gamestateMap_`[private]`

Referenced by cleanup(), printGamestateMap(), processGamestate(), processGamestates(), and ~GamestateClient().

unsigned int orxonox::GamestateClient::last_diff_`[private]`

Referenced by cleanup(), GamestateClient(), and processGamestates().

unsigned int orxonox::GamestateClient::last_gamestate_`[private]`

Referenced by GamestateClient().

packet::Gamestate* orxonox::GamestateClient::tempGamestate_`[private]`

Referenced by add(), cleanup(), GamestateClient(), processGamestates(), and ~GamestateClient().

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

- src/network/GamestateClient.h
- src/network/GamestateClient.cc