Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

PlayerList Class Reference

#include <playerlist.h>

List of all members.

Public Member Functions

 PlayerList ()
int setMaxPlayers (int num)
int getMaxPlayers ()
int getNumPlayers ()
int addPlayer (Player *p)
int removePlayerById (int playerid)
void removeAllPlayers ()
PlayergetPlayerById (int playerid)
chargetPlayerNameById (int playerid)
int setPlayerLatancy (int playerid, int latancy)
int getPlayerLatancy (int playerid)
void setPlayerName (int playerid, const char *name)
int setLastTimeStamp (int playerid, DWORD timestamp)
DWORD getLastTimeSamp (int playerid)
int getFreeId ()
bool isNotFull ()

Private Attributes

Player ** players
bool * freeslots
int numplayers
int maxplayers
int insertpos
bool isnotfull


Detailed Description

Definition at line 7 of file playerlist.h.


Constructor & Destructor Documentation

PlayerList::PlayerList  ) 
 

Definition at line 7 of file playerlist.cpp.

References isnotfull, numplayers, and setMaxPlayers().

Here is the call graph for this function:


Member Function Documentation

int PlayerList::addPlayer Player p  ) 
 

Definition at line 59 of file playerlist.cpp.

References freeslots, Player::getID(), isnotfull, maxplayers, numplayers, and players.

Referenced by Gne::addPlayer(), and Gne::joinServer().

Here is the call graph for this function:

int PlayerList::getFreeId  ) 
 

Definition at line 148 of file playerlist.cpp.

References freeslots, and maxplayers.

Referenced by Gne::getNextPlayerID().

DWORD PlayerList::getLastTimeSamp int  playerid  ) 
 

Definition at line 137 of file playerlist.cpp.

References Player::getLastTimeStamp(), and players.

Here is the call graph for this function:

int PlayerList::getMaxPlayers  ) 
 

Definition at line 16 of file playerlist.cpp.

References maxplayers.

Referenced by Gne::getMaxPlayers().

int PlayerList::getNumPlayers  ) 
 

Definition at line 36 of file playerlist.cpp.

References numplayers.

Referenced by Gne::aPlayer(), Gne::dealExtras(), Gne::getNumPlayers(), Gne::sendAttackNT(), Gne::sendChatMsg(), Gne::sendDisconnectToAll(), Gne::sendInfo(), Gne::sendPlayerPosToAll(), Gne::sendPlayerToAll(), Gne::setPlayerActionNT(), Gne::setPlayerDeath(), Gne::setPlayerExtras(), Gne::setPlayerName(), Gne::setPlayerPos(), Gne::setPlayerScore(), and Gne::setPlayerState().

Player * PlayerList::getPlayerById int  playerid  ) 
 

Definition at line 41 of file playerlist.cpp.

References players.

Referenced by Gne::aPlayer(), Gne::getPlayerById(), getPlayerNameById(), setLastTimeStamp(), and setPlayerName().

int PlayerList::getPlayerLatancy int  playerid  ) 
 

Definition at line 121 of file playerlist.cpp.

References Player::getLatancy(), and players.

Here is the call graph for this function:

char * PlayerList::getPlayerNameById int  playerid  ) 
 

Definition at line 50 of file playerlist.cpp.

References Player::getName(), and getPlayerById().

Here is the call graph for this function:

bool PlayerList::isNotFull  ) 
 

Definition at line 143 of file playerlist.cpp.

References isnotfull.

Referenced by Gne::listen().

void PlayerList::removeAllPlayers  ) 
 

Definition at line 101 of file playerlist.cpp.

References freeslots, isnotfull, numplayers, and players.

Referenced by Gne::clientThread().

int PlayerList::removePlayerById int  playerid  ) 
 

Definition at line 78 of file playerlist.cpp.

References freeslots, isnotfull, numplayers, and players.

Referenced by Gne::removePlayerById().

int PlayerList::setLastTimeStamp int  playerid,
DWORD  timestamp
 

Definition at line 128 of file playerlist.cpp.

References getPlayerById(), and Player::setLastTimeStamp().

Here is the call graph for this function:

int PlayerList::setMaxPlayers int  num  ) 
 

Definition at line 22 of file playerlist.cpp.

References freeslots, maxplayers, and players.

Referenced by PlayerList(), and Gne::setMaxPlayers().

int PlayerList::setPlayerLatancy int  playerid,
int  latancy
 

Definition at line 113 of file playerlist.cpp.

References players, and Player::setLatancy().

Here is the call graph for this function:

void PlayerList::setPlayerName int  playerid,
const char name
 

Definition at line 156 of file playerlist.cpp.

References getPlayerById().

Referenced by Gne::aPlayer(), and Gne::clientThread().

Here is the call graph for this function:


Member Data Documentation

bool* PlayerList::freeslots [private]
 

Definition at line 10 of file playerlist.h.

Referenced by addPlayer(), getFreeId(), removeAllPlayers(), removePlayerById(), and setMaxPlayers().

int PlayerList::insertpos [private]
 

Definition at line 13 of file playerlist.h.

bool PlayerList::isnotfull [private]
 

Definition at line 14 of file playerlist.h.

Referenced by addPlayer(), isNotFull(), PlayerList(), removeAllPlayers(), and removePlayerById().

int PlayerList::maxplayers [private]
 

Definition at line 12 of file playerlist.h.

Referenced by addPlayer(), getFreeId(), getMaxPlayers(), and setMaxPlayers().

int PlayerList::numplayers [private]
 

Definition at line 11 of file playerlist.h.

Referenced by addPlayer(), getNumPlayers(), PlayerList(), removeAllPlayers(), and removePlayerById().

Player** PlayerList::players [private]
 

Definition at line 9 of file playerlist.h.

Referenced by addPlayer(), getLastTimeSamp(), getPlayerById(), getPlayerLatancy(), removeAllPlayers(), removePlayerById(), setMaxPlayers(), and setPlayerLatancy().


Generated on Sun Jun 5 15:50:54 2005 for Defacto by  doxygen 1.4.3