PVLEPlayer Class Reference

Base class for a human or CPU player. More...

#include <PVLEPlayer.h>

List of all members.

Public Member Functions

 PVLEPlayer ()
 PVLEPlayer (PVLETeam *pTeam)
PVLETeamgetTeam ()
void setTeam (PVLETeam *pTeam)
 NULL team is allowed.
ControlMappergetControlMapper ()
const ControlMappergetControlMapper () const

Protected Member Functions

PVLEGamegetGame ()
virtual void onTeamChange (PVLETeam *pOldTeam, PVLETeam *pNewTeam)
 Called when the team changes (used for derivate classes).
virtual ~PVLEPlayer ()
 Protected destructor forces the object to be deleted by being dereferenced.

Protected Attributes

PVLETeampTeam
 NULL team is the same as "no team".
ControlMapper controlMapper
 Control mapper of the player. It is initialized with no bindings.


Detailed Description

Base class for a human or CPU player.

There must be only ONE instance of this class for each player (so testing equality on pointers is enough).

Todo:
Must be thread safe (?)

Definition at line 49 of file PVLEPlayer.h.


Constructor & Destructor Documentation

PVLEPlayer::PVLEPlayer (  )  [inline]

Definition at line 52 of file PVLEPlayer.h.

PVLEPlayer::PVLEPlayer ( PVLETeam pTeam  )  [inline]

Definition at line 53 of file PVLEPlayer.h.

virtual PVLEPlayer::~PVLEPlayer (  )  [inline, protected, virtual]

Protected destructor forces the object to be deleted by being dereferenced.

Also avoids the object from beeing created on the stack.

Definition at line 76 of file PVLEPlayer.h.


Member Function Documentation

const ControlMapper& PVLEPlayer::getControlMapper (  )  const [inline]

Definition at line 59 of file PVLEPlayer.h.

ControlMapper& PVLEPlayer::getControlMapper (  )  [inline]

Definition at line 58 of file PVLEPlayer.h.

PVLEGame* PVLEPlayer::getGame (  )  [protected]

PVLETeam* PVLEPlayer::getTeam (  )  [inline]

Definition at line 55 of file PVLEPlayer.h.

Referenced by C3DPhy::setPlayer(), and C3DPhy::setTeamAndPlayer().

virtual void PVLEPlayer::onTeamChange ( PVLETeam pOldTeam,
PVLETeam pNewTeam 
) [inline, protected, virtual]

Called when the team changes (used for derivate classes).

Definition at line 72 of file PVLEPlayer.h.

void PVLEPlayer::setTeam ( PVLETeam pTeam  )  [inline]

NULL team is allowed.

Definition at line 56 of file PVLEPlayer.h.

Referenced by PVLETeam::addPlayer(), and PVLETeam::removePlayer().


Member Data Documentation

Control mapper of the player. It is initialized with no bindings.

Definition at line 69 of file PVLEPlayer.h.

NULL team is the same as "no team".

Definition at line 67 of file PVLEPlayer.h.


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

Generated on Sun Jan 17 11:39:29 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9