EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | Friends | List of all members
EMessage Class Reference

The message queue base message class. More...

#include <emsg.h>

Inheritance diagram for EMessage:
EMessageVector< T > EQueueMessage

Public Member Functions

 EMessage ()
 Default constructor. More...
 
 ~EMessage ()
 Class destructor. More...
 
virtual Void getLength (ULong &length)
 Calculates the packed length of a message. More...
 
virtual Void serialize (pVoid pBuffer, ULong &nOffset)
 Serializes (packs) a message. More...
 
virtual Void unserialize (pVoid pBuffer, ULong &nOffset)
 Unserializes (unpacks) a message. More...
 
Void elementLength (Bool val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (Char val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (UChar val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (Short val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (UShort val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (Long val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (ULong val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (LongLong val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (ULongLong val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (Float val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (Double val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (cpStr val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (ETimer &val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void elementLength (ETime &val, ULong &length)
 Adds the length of a Bool value to the message length. More...
 
Void pack (Bool val, pVoid pBuffer, ULong &nOffset)
 Packs the Bool value. More...
 
Void pack (Char val, pVoid pBuffer, ULong &nOffset)
 Packs the Char value. More...
 
Void pack (UChar val, pVoid pBuffer, ULong &nOffset)
 Packs the UChar value. More...
 
Void pack (Short val, pVoid pBuffer, ULong &nOffset)
 Packs the Short value. More...
 
Void pack (UShort val, pVoid pBuffer, ULong &nOffset)
 Packs the UShort value. More...
 
Void pack (Long val, pVoid pBuffer, ULong &nOffset)
 Packs the Long value. More...
 
Void pack (ULong val, pVoid pBuffer, ULong &nOffset)
 Packs the ULong value. More...
 
Void pack (LongLong val, pVoid pBuffer, ULong &nOffset)
 Packs the LongLong value. More...
 
Void pack (ULongLong val, pVoid pBuffer, ULong &nOffset)
 Packs the ULongLong value. More...
 
Void pack (Float val, pVoid pBuffer, ULong &nOffset)
 Packs the Float value. More...
 
Void pack (Double val, pVoid pBuffer, ULong &nOffset)
 Packs the Double value. More...
 
Void pack (cpStr val, pVoid pBuffer, ULong &nOffset)
 Packs the NULL terminated string value. More...
 
Void pack (ETimer &val, pVoid pBuffer, ULong &nOffset)
 Packs the Timer value. More...
 
Void pack (ETime &val, pVoid pBuffer, ULong &nOffset)
 Packs the Time value. More...
 
Void pack (EString &val, pVoid pBuffer, ULong &nOffset)
 Packs the string value. More...
 
Void unpack (Bool &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Bool value. More...
 
Void unpack (Char &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Char value. More...
 
Void unpack (UChar &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a UChar value. More...
 
Void unpack (Short &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Short value. More...
 
Void unpack (UShort &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a UShort value. More...
 
Void unpack (Long &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Long value. More...
 
Void unpack (ULong &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a ULong value. More...
 
Void unpack (LongLong &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a LongLong value. More...
 
Void unpack (ULongLong &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a ULongLong value. More...
 
Void unpack (Float &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Float value. More...
 
Void unpack (Double &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Double value. More...
 
Void unpack (pStr val, pVoid pBuffer, ULong &nOffset)
 Unpacks a NULL terminated string value. More...
 
Void unpack (ETimer &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Timer value. More...
 
Void unpack (ETime &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a Time value. More...
 
Void unpack (EString &val, pVoid pBuffer, ULong &nOffset)
 Unpacks a string value. More...
 

Friends

class EQueueBase
 

Detailed Description

The message queue base message class.

Constructor & Destructor Documentation

EMessage::EMessage ( )
inline

Default constructor.

EMessage::~EMessage ( )
inline

Class destructor.

Member Function Documentation

Void EMessage::elementLength ( Bool  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Bool value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( Char  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Char value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( UChar  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe UChar value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( Short  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Short value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( UShort  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe UShort value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( Long  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Long value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( ULong  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe ULong value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( LongLong  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe LongLong value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( ULongLong  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe ULongLong value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( Float  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Float value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( Double  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Double value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( cpStr  val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe NULL terminated string value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( ETimer val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Timer value to calculate the length for.
lengththe length value to update.
Void EMessage::elementLength ( ETime val,
ULong &  length 
)
inline

Adds the length of a Bool value to the message length.

Parameters
valthe Time value to calculate the length for.
lengththe length value to update.
Void EMessage::getLength ( ULong &  length)
virtual

Calculates the packed length of a message.

Parameters
lengtha reference to the length value to update.

Reimplemented in EQueueMessage.

Void EMessage::pack ( Bool  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Bool value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( Char  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Char value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( UChar  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the UChar value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( Short  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Short value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( UShort  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the UShort value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( Long  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Long value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( ULong  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the ULong value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( LongLong  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the LongLong value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( ULongLong  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the ULongLong value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( Float  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Float value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( Double  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Double value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( cpStr  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the NULL terminated string value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( ETimer val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Timer value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( ETime val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the Time value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::pack ( EString val,
pVoid  pBuffer,
ULong &  nOffset 
)

Packs the string value.

Parameters
valthe value to pack.
pBuffera pointer to the destination buffer.
nOffsetthe offset in the destination buffer to write to.
Void EMessage::serialize ( pVoid  pBuffer,
ULong &  nOffset 
)
virtual

Serializes (packs) a message.

Parameters
pBuffera pointer to the destination buffer.
nOffseta reference to the next location to write to in the buffer.

Reimplemented in EQueueMessage.

Void EMessage::unpack ( Bool &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Bool value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( Char &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Char value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( UChar &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a UChar value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( Short &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Short value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( UShort &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a UShort value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( Long &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Long value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( ULong &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a ULong value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( LongLong &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a LongLong value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( ULongLong &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a ULongLong value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( Float &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Float value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( Double &  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Double value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( pStr  val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a NULL terminated string value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( ETimer val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Timer value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( ETime val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a Time value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unpack ( EString val,
pVoid  pBuffer,
ULong &  nOffset 
)

Unpacks a string value.

Parameters
valthe destination for the value.
pBuffera pointer to the source buffer.
nOffsetthe offset in the source buffer to read from.
Void EMessage::unserialize ( pVoid  pBuffer,
ULong &  nOffset 
)
virtual

Unserializes (unpacks) a message.

Parameters
pBuffera pointer to the raw buffer to unpack.
nOffseta reference to the next location in the buffer to unpack.

Reimplemented in EQueueMessage.

Friends And Related Function Documentation

friend class EQueueBase
friend

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