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::EMessage ( )
inline

Default constructor.

◆ ~EMessage()

EMessage::~EMessage ( )
inline

Class destructor.

Member Function Documentation

◆ elementLength() [1/14]

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.

◆ elementLength() [2/14]

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.

◆ elementLength() [3/14]

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.

◆ elementLength() [4/14]

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.

◆ elementLength() [5/14]

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.

◆ elementLength() [6/14]

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.

◆ elementLength() [7/14]

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.

◆ elementLength() [8/14]

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.

◆ elementLength() [9/14]

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.

◆ elementLength() [10/14]

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.

◆ elementLength() [11/14]

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.

◆ elementLength() [12/14]

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.

◆ elementLength() [13/14]

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.

◆ elementLength() [14/14]

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.

◆ getLength()

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.

◆ pack() [1/15]

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.

◆ pack() [2/15]

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.

◆ pack() [3/15]

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.

◆ pack() [4/15]

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.

◆ pack() [5/15]

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.

◆ pack() [6/15]

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.

◆ pack() [7/15]

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.

◆ pack() [8/15]

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.

◆ pack() [9/15]

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.

◆ pack() [10/15]

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.

◆ pack() [11/15]

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.

◆ pack() [12/15]

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.

◆ pack() [13/15]

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.

◆ pack() [14/15]

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.

◆ pack() [15/15]

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.

◆ serialize()

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.

◆ unpack() [1/15]

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.

◆ unpack() [2/15]

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.

◆ unpack() [3/15]

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.

◆ unpack() [4/15]

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.

◆ unpack() [5/15]

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.

◆ unpack() [6/15]

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.

◆ unpack() [7/15]

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.

◆ unpack() [8/15]

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.

◆ unpack() [9/15]

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.

◆ unpack() [10/15]

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.

◆ unpack() [11/15]

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.

◆ unpack() [12/15]

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.

◆ unpack() [13/15]

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.

◆ unpack() [14/15]

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.

◆ unpack() [15/15]

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.

◆ unserialize()

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

◆ EQueueBase

friend class EQueueBase
friend

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