TPProto::Message Class Reference

A Frame of a Message from a Board. More...

#include <message.h>

Inheritance diagram for TPProto::Message:

TPProto::Frame List of all members.

Public Member Functions

 Message ()
 Default constructor.
virtual ~Message ()
 Required virtual destructor.
void packBuffer (Buffer *buf)
 Pack this Message Frame into a Buffer.
bool unpackBuffer (Buffer *buf)
 Unpack this Message from a Buffer.
unsigned int getBoardId ()
 Gets the Board id number this Message is on.
int getSlot ()
 Gets the slot number this Message is in.
unsigned int getMessageType ()
 Gets the message type.
std::string getSubject ()
 Gets the subject of the message.
std::string getBody ()
 Gets the body text of the message.
uint32_t getTurnNum () const
 Gets the turn number this message was posted on.
std::map< int32_t, uint32_t > getReferences () const
 Gets the references for this message.
void setBoardId (unsigned int board)
 Sets the Board id for the message.
void setSlot (int nsl)
 Sets the slot number for this message to go into.
void setMessageType (unsigned int mt)
 Sets the message type.
void setSubject (const std::string &ns)
 Sets the subject.
void setBody (const std::string &nb)
 Sets the body text.
void setReferences (std::map< int32_t, uint32_t > rs)
 Sets the references for this message.

Detailed Description

A Frame of a Message from a Board.


Member Function Documentation

void TPProto::Message::packBuffer ( Buffer buf  )  [virtual]

Pack this Message Frame into a Buffer.

Parameters:
buf The Buffer to pack into.

Implements TPProto::Frame.

bool TPProto::Message::unpackBuffer ( Buffer buf  )  [virtual]

Unpack this Message from a Buffer.

Parameters:
buf The Buffer to unpack out of.
Returns:
True if successful.

Implements TPProto::Frame.

unsigned int TPProto::Message::getBoardId (  ) 

Gets the Board id number this Message is on.

Returns:
The board id.

int TPProto::Message::getSlot (  ) 

Gets the slot number this Message is in.

Can be -1 if it is to be the last message.

Returns:
The slot number.

unsigned int TPProto::Message::getMessageType (  ) 

Gets the message type.

Deprecated:
Not used in TP03 or later. Use references instead.
Returns:
The message type.

std::string TPProto::Message::getSubject (  ) 

Gets the subject of the message.

Returns:
The subject.

std::string TPProto::Message::getBody (  ) 

Gets the body text of the message.

Returns:
The body text.

uint32_t TPProto::Message::getTurnNum (  )  const

Gets the turn number this message was posted on.

Returns:
The turn number.

std::map< int32_t, uint32_t > TPProto::Message::getReferences (  )  const

Gets the references for this message.

Returns:
The map of references.

void TPProto::Message::setBoardId ( unsigned int  board  ) 

Sets the Board id for the message.

Parameters:
board The Board this message should be posted to.

void TPProto::Message::setSlot ( int  nsl  ) 

Sets the slot number for this message to go into.

Starts from 0. Can be -1 for the last slot. /param nsl The slot number.

void TPProto::Message::setMessageType ( unsigned int  mt  ) 

Sets the message type.

Deprecated:
Not used in TP03 or later. Use references instead.
Parameters:
mt The message type.

void TPProto::Message::setSubject ( const std::string &  ns  ) 

Sets the subject.

Parameters:
ns The subject.

void TPProto::Message::setBody ( const std::string &  nb  ) 

Sets the body text.

Parameters:
nb The body text.

void TPProto::Message::setReferences ( std::map< int32_t, uint32_t >  rs  ) 

Sets the references for this message.

Parameters:
rs The map of references.


The documentation for this class was generated from the following files:
Generated on Tue Jan 6 06:30:52 2009 for libtpproto-cpp by  doxygen 1.5.1