Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CPlayerPiece Class Reference

CPlayerPiece. More...

#include <GamePackage.h>

Inheritance diagram for CPlayerPiece:

IPackable List of all members.

Public Member Functions

 CPlayerPiece ()
 CPlayerPiece.
virtual ~CPlayerPiece ()
 ~CPlayerPiece
void SetCEID (const CEID &id)
 SetCEID.
void SetPiece (const CPiece *p)
 SetPiece.
CPieceGetPiece (bool doCopy=true) const
 GetPiece.
CEID GetCEID () const
 GetCEID.
bool Pack (int8 *ptr, uint32 &size) const
 Pack.
bool UnPack (const int8 *ptr, const uint32 size)
 UnPack.

Detailed Description

CPlayerPiece.

Description: Class containing a CEID of a player and their corresponding piece.

Limitations: NONE


Constructor & Destructor Documentation

CPlayerPiece::CPlayerPiece  )  [inline]
 

CPlayerPiece.

Description: Class constructor

Limitations: NONE

CPlayerPiece::~CPlayerPiece  )  [inline, virtual]
 

~CPlayerPiece

Description: Class deconstructor

Limitations: If the piece was unpacked then there is a possibility that the vtable persisted and a delete function from outside of this DLL will be called when the piece is deleted, thus throwing an exception. All memory created in a DLL can only be deleted by that DLL. Cast the pointer as an int8* before deleting if it was unpacked.


Member Function Documentation

CEID CPlayerPiece::GetCEID  )  const [inline]
 

GetCEID.

Description: Gets the CEID

Returns:
Returns the CEID
Limitations: NONE

CPiece * CPlayerPiece::GetPiece bool  doCopy = true  )  const [inline]
 

GetPiece.

Description: Gets the Piece

Returns:
Returns the Piece
Limitations: NONE

bool CPlayerPiece::Pack int8 *  ptr,
uint32 &  size
const [inline, virtual]
 

Pack.

Description: Packs this object into a linear buffer.

Parameters:
ptr is an out parameter that contains the contents of this object. If ptr is NULL, size will be set to the amount of memory that ptr needs to point to.
size is the length of the ptr buffer. This must be set to the correct size.
Returns:
True if successfully packed and false otherwise.
Limitations: NONE

Implements IPackable.

void CPlayerPiece::SetCEID const CEID id  )  [inline]
 

SetCEID.

Description: Sets the CEID

Returns:
void
Limitations: NONE

void CPlayerPiece::SetPiece const CPiece p  )  [inline]
 

SetPiece.

Description: Sets the Piece

Returns:
void
Limitations: NONE

bool CPlayerPiece::UnPack const int8 *  ptr,
const uint32  size
[inline, virtual]
 

UnPack.

Description: Unpacks the buffer and sets its contents to this object so that this object contains the data from the buffer.

Parameters:
prt is the buffer to unpack
size is the size of the buffer.
Returns:
True if successfully unpacked and false otherwise.
Limitations: Doesn't do any checks on the validity of the CPiece part if the m_pPiece variable is NULL.

Implements IPackable.


The documentation for this class was generated from the following file:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo