MessageOut Class Reference

Used for building an outgoing message. More...

#include <messageout.hpp>

List of all members.

Public Member Functions

 MessageOut ()
 Constructor.
 MessageOut (int id)
 Constructor that takes a message ID.
 ~MessageOut ()
 Destructor.
void clear ()
 Clears current message.
void writeByte (int value)
 Writes an integer on one byte.
void writeShort (int value)
 Writes an integer on two bytes.
void writeLong (int value)
 Writes an integer on four bytes.
void writeCoordinates (int x, int y)
 Writes a 3-byte block containing tile-based coordinates.
void writeString (const std::string &string, int length=-1)
 Writes a string.
char * getData () const
 Returns the content of the message.
unsigned int getLength () const
 Returns the length of the data.

Friends

std::ostream & operator<< (std::ostream &os, const MessageOut &msg)
 Streams message ID and length to the given output stream.


Detailed Description

Used for building an outgoing message.

Definition at line 30 of file messageout.hpp.


Member Function Documentation

void MessageOut::writeByte ( int  value  ) 

void MessageOut::writeShort ( int  value  ) 

void MessageOut::writeLong ( int  value  ) 

void MessageOut::writeString ( const std::string &  string,
int  length = -1 
)


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

Generated on Sun Apr 26 17:30:46 2009 for TMW Server Collection by  doxygen 1.5.5