EpcTools
An event based multi-threaded C++ development framework.
|
The message queue base message class. More...
#include <emsg.h>
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 |
The message queue base message class.
|
inline |
Default constructor.
|
inline |
Class destructor.
|
inline |
Adds the length of a Bool value to the message length.
val | the Bool value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Char value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the NULL terminated string value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Double value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Time value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Timer value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Float value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Long value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the LongLong value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the Short value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the UChar value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the ULong value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the ULongLong value to calculate the length for. |
length | the length value to update. |
|
inline |
Adds the length of a Bool value to the message length.
val | the UShort value to calculate the length for. |
length | the length value to update. |
|
virtual |
Calculates the packed length of a message.
length | a reference to the length value to update. |
Reimplemented in EQueueMessage.
Void EMessage::pack | ( | Bool | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Bool value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | Char | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Char value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | cpStr | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the NULL terminated string value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | Double | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Double value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | EString & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the string value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | ETime & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Time value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | ETimer & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Timer value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | Float | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Float value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | Long | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Long value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | LongLong | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the LongLong value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | Short | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the Short value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | UChar | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the UChar value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | ULong | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the ULong value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | ULongLong | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the ULongLong value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
Void EMessage::pack | ( | UShort | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Packs the UShort value.
val | the value to pack. |
pBuffer | a pointer to the destination buffer. |
nOffset | the offset in the destination buffer to write to. |
|
virtual |
Serializes (packs) a message.
pBuffer | a pointer to the destination buffer. |
nOffset | a 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.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | Char & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Char value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | Double & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Double value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | EString & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a string value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | ETime & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Time value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | ETimer & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Timer value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | Float & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Float value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | Long & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Long value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | LongLong & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a LongLong value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | pStr | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a NULL terminated string value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | Short & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a Short value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | UChar & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a UChar value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | ULong & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a ULong value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | ULongLong & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a ULongLong value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
Void EMessage::unpack | ( | UShort & | val, |
pVoid | pBuffer, | ||
ULong & | nOffset | ||
) |
Unpacks a UShort value.
val | the destination for the value. |
pBuffer | a pointer to the source buffer. |
nOffset | the offset in the source buffer to read from. |
|
virtual |
Unserializes (unpacks) a message.
pBuffer | a pointer to the raw buffer to unpack. |
nOffset | a reference to the next location in the buffer to unpack. |
Reimplemented in EQueueMessage.
|
friend |