orxonox::ClientInformation Class Reference

#include <src/network/ClientInformation.h>

List of all members.

Public Member Functions

void addFailure ()
 ClientInformation ()
int getFailures ()
unsigned int getGamestateID ()
unsigned int getID ()
double getPacketLoss ()
unsigned int getPartialGamestateID ()
ENetPeergetPeer ()
uint32_t getRTT ()
unsigned int getShipID ()
bool getSynched ()
ClientInformationnext ()
ClientInformationprev ()
void resetFailures ()
bool setGamestateID (int id)
void setID (int clientID)
bool setPartialGamestateID (int id)
bool setPeer (ENetPeer *peer)
void setShipID (unsigned int id)
bool setSynched (bool s)
 ~ClientInformation ()

Static Public Member Functions

static ClientInformationfindClient (ENetAddress *address, bool look_backwards=false)
static ClientInformationfindClient (unsigned int clientID, bool look_backwards=false)
static ClientInformationgetBegin ()
static bool hasClients ()
static ClientInformationinsertBack (ClientInformation *ins)
static bool removeClient (ENetPeer *peer)
static bool removeClient (unsigned int clientID)

Private Member Functions

ClientInformationinsertAfter (ClientInformation *ins)
ClientInformationinsertBefore (ClientInformation *ins)
bool setNext (ClientInformation *next)
bool setPrev (ClientInformation *prev)

Private Attributes

unsigned int clientID_
unsigned short failures_
unsigned int gamestateID_
ClientInformationnexte
unsigned int partialGamestateID_
ENetPeerpeer_
ClientInformationpreve
unsigned int ShipID_
bool synched_

Static Private Attributes

static ClientInformationhead_ = 0


Detailed Description

This class implements a list for client informations
Author:
Oliver Scheuss

Constructor & Destructor Documentation

orxonox::ClientInformation::ClientInformation (  ) 

orxonox::ClientInformation::~ClientInformation (  ) 

References head_, next(), prev(), setNext(), and setPrev().


Member Function Documentation

void orxonox::ClientInformation::addFailure (  ) 

References failures_.

ClientInformation * orxonox::ClientInformation::findClient ( ENetAddress address,
bool  look_backwards = false 
) [static]

This function goes forward through the list and looks for an element with clientID This function should only be applied to the head of the list

Parameters:
peer peer to look for
Returns:
pointer to the element in the list

References getPeer(), head_, and next().

ClientInformation * orxonox::ClientInformation::findClient ( unsigned int  clientID,
bool  look_backwards = false 
) [static]

static ClientInformation* orxonox::ClientInformation::getBegin (  )  [inline, static]

int orxonox::ClientInformation::getFailures (  ) 

References failures_.

Referenced by orxonox::Server::sendObjectDeletes().

unsigned int orxonox::ClientInformation::getGamestateID (  ) 

unsigned int orxonox::ClientInformation::getID (  ) 

double orxonox::ClientInformation::getPacketLoss (  ) 

unsigned int orxonox::ClientInformation::getPartialGamestateID (  ) 

References partialGamestateID_.

ENetPeer * orxonox::ClientInformation::getPeer (  ) 

uint32_t orxonox::ClientInformation::getRTT (  ) 

unsigned int orxonox::ClientInformation::getShipID (  )  [inline]

bool orxonox::ClientInformation::getSynched (  ) 

static bool orxonox::ClientInformation::hasClients (  )  [inline, static]

References head_.

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

ClientInformation * orxonox::ClientInformation::insertAfter ( ClientInformation ins  )  [private]

References next(), nexte, setNext(), and setPrev().

ClientInformation * orxonox::ClientInformation::insertBack ( ClientInformation ins  )  [static]

References head_, next(), setNext(), and setPrev().

Referenced by orxonox::Server::addClient().

ClientInformation * orxonox::ClientInformation::insertBefore ( ClientInformation ins  )  [private]

References prev(), preve, setNext(), and setPrev().

ClientInformation * orxonox::ClientInformation::next (  ) 

ClientInformation * orxonox::ClientInformation::prev (  ) 

References preve.

Referenced by insertBefore(), and ~ClientInformation().

bool orxonox::ClientInformation::removeClient ( ENetPeer peer  )  [static]

References getPeer(), head_, and next().

bool orxonox::ClientInformation::removeClient ( unsigned int  clientID  )  [static]

void orxonox::ClientInformation::resetFailures (  ) 

References failures_.

bool orxonox::ClientInformation::setGamestateID ( int  id  ) 

References gamestateID_.

Referenced by orxonox::GamestateManager::ack().

void orxonox::ClientInformation::setID ( int  clientID  ) 

References clientID_.

Referenced by orxonox::Server::addClient().

bool orxonox::ClientInformation::setNext ( ClientInformation next  )  [private]

bool orxonox::ClientInformation::setPartialGamestateID ( int  id  ) 

References partialGamestateID_.

bool orxonox::ClientInformation::setPeer ( ENetPeer peer  ) 

References peer_.

Referenced by orxonox::Server::addClient().

bool orxonox::ClientInformation::setPrev ( ClientInformation prev  )  [private]

References head_, and preve.

Referenced by insertAfter(), insertBack(), insertBefore(), and ~ClientInformation().

void orxonox::ClientInformation::setShipID ( unsigned int  id  )  [inline]

bool orxonox::ClientInformation::setSynched ( bool  s  ) 

References synched_.

Referenced by orxonox::Server::createClient().


Member Data Documentation

unsigned int orxonox::ClientInformation::clientID_ [private]

Referenced by getID(), and setID().

unsigned short orxonox::ClientInformation::failures_ [private]

unsigned int orxonox::ClientInformation::ShipID_ [private]


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

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