Packet Class Reference

#include <Packet.h>

List of all members.

Public Types

typedef long uri_t

Public Member Functions

 Packet (const std::string &type=PACKET_EMPTY_STR)
 ~Packet ()
void pushString (const std::string &str)
void pushChar (char c)
void pushShort (short s)
void pushLong (long l)
void pushFloat (float f)
void pushDouble (double d)
void pushURI (const uri_t &uri)
std::string popFrontString ()
char popFrontChar ()
short popFrontShort ()
long popFrontLong ()
float popFrontFloat ()
double popFrontDouble ()
uri_t popFrontURI ()
const std::string & getType () const
const std::string & getMessage () const
void dumpToFile (FILE *fp=stderr) const
bool isEmpty ()

Static Public Attributes

static const char * PACKET_EMPTY_STR

Static Protected Member Functions

static Packet String2Packet (const std::string &s)

Protected Attributes

std::string msg
std::string type

Friends

class Network
class PacketSender


Member Typedef Documentation

typedef long Packet::uri_t


Constructor & Destructor Documentation

Packet::Packet ( const std::string &  type = PACKET_EMPTY_STR  ) 

Packet::~Packet (  )  [inline]


Member Function Documentation

void Packet::dumpToFile ( FILE *  fp = stderr  )  const

const std::string& Packet::getMessage (  )  const [inline]

const std::string& Packet::getType (  )  const [inline]

bool Packet::isEmpty (  )  [inline]

char Packet::popFrontChar (  ) 

double Packet::popFrontDouble (  ) 

float Packet::popFrontFloat (  ) 

long Packet::popFrontLong (  ) 

short Packet::popFrontShort (  ) 

std::string Packet::popFrontString (  ) 

uri_t Packet::popFrontURI (  ) 

void Packet::pushChar ( char  c  ) 

void Packet::pushDouble ( double  d  ) 

void Packet::pushFloat ( float  f  ) 

void Packet::pushLong ( long  l  ) 

void Packet::pushShort ( short  s  ) 

void Packet::pushString ( const std::string &  str  ) 

void Packet::pushURI ( const uri_t uri  ) 

static Packet Packet::String2Packet ( const std::string &  s  )  [static, protected]


Friends And Related Function Documentation

friend class Network [friend]

friend class PacketSender [friend]


Member Data Documentation

std::string Packet::msg [protected]

const char* Packet::PACKET_EMPTY_STR [static]

std::string Packet::type [protected]


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7