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

POTextMsg Class Reference

A simple text message. More...

#include <POTextMsg.h>

Inheritance diagram for POTextMsg:

POMessage List of all members.

Public Member Functions

 POTextMsg (const string &txt="")
 Default constructor.

 POTextMsg (const POTextMsg &cpy)
 POTextMsg (const char *format,...)
virtual ~POTextMsg ()
virtual string messageType () const
string getText () const
void setText (const string &txt)
virtual POMessageclone () const
int packsize () const
int pack (char *buf) const
int unpack (char *buf)

Detailed Description

A simple text message.


Constructor & Destructor Documentation

POTextMsg::POTextMsg const string &  txt = ""  ) 
 

Default constructor.

POTextMsg::POTextMsg const POTextMsg cpy  ) 
 

POTextMsg::POTextMsg const char *  format,
... 
 

POTextMsg::~POTextMsg  )  [virtual]
 


Member Function Documentation

POMessage * POTextMsg::clone  )  const [virtual]
 

Creates an identical copy of this message. This function must be overloaded in derived classes.

Returns:
a copy of this message

Reimplemented from POMessage.

string POTextMsg::getText  )  const [inline]
 

virtual string POTextMsg::messageType  )  const [inline, virtual]
 

Reimplemented from POMessage.

int POTextMsg::pack char *  buffer  )  const
 

packs the message into a pre-alocated buffer of size >= packsize()

Parameters:
buffer - the buffer to pack into
Returns:
the number of bytes packed

Reimplemented from POMessage.

int POTextMsg::packsize  )  const
 

calculates the number of bytes needed to pack this message

Returns:
size in bytes

Reimplemented from POMessage.

void POTextMsg::setText const string &  txt  ) 
 

int POTextMsg::unpack char *  buffer  ) 
 

unpacks the message, setting source, destination, and derived type

Parameters:
buffer the buffer to unpack, must be valid, no error checking
Returns:
the number of bytes unpacked

Reimplemented from POMessage.


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 12:49:29 2004 for pexpr by doxygen 1.3.4