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

CMessage Class Reference

CMessage. More...

#include <Message.h>

Inheritance diagram for CMessage:

CGameMessage CGatewayMessage CIdentMessage CParamMessage CSystemMessage CGameTourneyMessage List of all members.

Public Member Functions

 CMessage ()
 CMessage.
 CMessage (const CMessage &m)
 CMessage.
 ~CMessage ()
 ~CMessage
void Reply ()
 Reply.
void SetSender (uint32 sender)
 SetSender.
void SetRecipient (uint32 recipient)
 SetRecipient.
void SetTimeStamp (TIMESTRUCT timeStmp)
 SetTimeStamp.
void SetCRC (uint32 CRC)
 SetCRC.
void SetMsgType (MsgTypes mType)
 SetMsgType.
uint32 GetSender () const
 GetSender.
uint32 GetRecipient () const
 GetRecipient.
TIMESTRUCT GetTimeStamp () const
 GetTimeStamp.
uint32 GetCRC () const
 GetCRC.
uint32 GetLength () const
 GetLength.
uint32 GetMsgType () const
 GetMsgType.
void SetMsgBody (int8 *ptr, uint32 size, bool bDoCopy=true, bool bIsPacked=false)
 SetMsgBody().
int8 * GetMsgBody (bool bDoCopy=true) const
 GetMsgBody().
uint32 GetMsgBodySize () const
 GetMsgBodySize().
bool IsBufferPacked () const
 IsBufferPacked.
virtual void operator= (const CMessage &m)
 operator =

Detailed Description

CMessage.

Description: : The message class is the primary class which holds messages passed between modules

Limitations: : None


Constructor & Destructor Documentation

CMessage::CMessage  ) 
 

CMessage.

Description:: Default constructor

Limitations: None

CMessage::CMessage const CMessage m  ) 
 

CMessage.

Description:: Copy constructor

Parameters:
m,: CMessage to copy into new CMessage
Limitations: If the CMessage represents a derived class, DO NOT call the copy constructor. It is very likely that you will wipe out the virual function table!

CMessage::~CMessage  ) 
 

~CMessage

Description: Default Destructor

Limitations: None


Member Function Documentation

uint32 CMessage::GetCRC  )  const
 

GetCRC.

Description: Returns the CRC checksum of the message

Returns:
uint32: The CRC checksum of the message
Limitations: None

uint32 CMessage::GetLength  )  const
 

GetLength.

Description: Returns the length of the message body

Returns:
uint32: The message length
Limitations: None

int8 * CMessage::GetMsgBody bool  bDoCopy = true  )  const
 

GetMsgBody().

Description: Returns the Message Header

Returns:
pointer to message body
Limitations: None

uint32 CMessage::GetMsgBodySize  )  const
 

GetMsgBodySize().

Description: Returns the Message Body size

Returns:
size of message body
Limitations: None

uint32 CMessage::GetMsgType  )  const
 

GetMsgType.

Description: Returns the message type

Returns:
uint32: The message type
Limitations: None

uint32 CMessage::GetRecipient  )  const
 

GetRecipient.

Description: Returns the recipient ID of the message

Returns:
uint32: The recipient ID
Limitations: None

uint32 CMessage::GetSender  )  const
 

GetSender.

Description: Returns the sender ID

Returns:
uint32: The sender ID of the message
Limitations: None

TIMESTRUCT CMessage::GetTimeStamp  )  const
 

GetTimeStamp.

Description: Returns the timestamp of the message

Returns:
timestamp: The message timestamp
Limitations: None

bool CMessage::IsBufferPacked  )  const
 

IsBufferPacked.

Description: Returns true if the message buffer is packed and false otherwise.

Returns:
True if the buffer is packed and false otherwise.
Limitations: None

void CMessage::operator= const CMessage m  )  [virtual]
 

operator =

Description: Copies all attributes from the current message into another

Parameters:
m,: CMessage that will be filled with the current attributes
Returns:
void
Limitations: None

void CMessage::Reply  ) 
 

Reply.

Description: This function provides a convienient way to create a reply message. The source and destinaton addresses are swapped so that the message will be returned to the sender when mailed (through the dispatcher).

Returns:
void
Limitations: None

void CMessage::SetCRC uint32  CRC  ) 
 

SetCRC.

Description: Sets the CRC checksum for the message

Parameters:
CRC,: The CRC to Set
Returns:
void
Limitations: None

void CMessage::SetMsgBody int8 *  ptr,
uint32  size,
bool  bDoCopy = true,
bool  bIsPacked = false
 

SetMsgBody().

Description: Sets the pointer to the message body

Parameters:
ptr,: pointer to message body size: size of message body
Returns:
void
Limitations: size must be actual size of data pointed to by ptr

void CMessage::SetMsgType MsgTypes  msgType  ) 
 

SetMsgType.

Description: Sets the message type

Parameters:
msgType,: The message type
Returns:
void
Limitations: None

void CMessage::SetRecipient uint32  recipient  ) 
 

SetRecipient.

Description: Sets the intended recipient of the message

Parameters:
recipient,: The recipient ID
Returns:
void
Limitations: None

void CMessage::SetSender uint32  sender  ) 
 

SetSender.

Description: Sets the sender of the message

Parameters:
sender,: The sender ID
Returns:
void
Limitations: None

void CMessage::SetTimeStamp TIMESTRUCT  timeStmp  ) 
 

SetTimeStamp.

Description: Sets the timestamp on the message

Parameters:
timeStmp,: The timestamp to Set
Returns:
void
Limitations: None


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

SourceForge.net Logo