![]() |
VR-Forces Developer's Guide
|
DtBaseMessage is the base class for all messages that can be sent between the server and the client.

Public Member Functions | |
| DtBaseMessage () | |
| virtual | ~DtBaseMessage () |
| virtual unsigned int | messageType () const |
| virtual unsigned char * | encode () |
| virtual int | messageSize () |
| virtual DtBaseMessage * | clone ()=0 |
| virtual void | setRequestorId (const std::string &requestor) |
| virtual std::string | requestorId () |
| virtual void | setRequestId (int id) |
| virtual int | requestId () |
Protected Member Functions | |
| virtual void | serialize (DtStreamWriter &writer) |
| virtual void | deserialize (DtStreamReader &reader) |
Protected Attributes | |
| unsigned int | myMessageType |
| std::string | myRequestorId |
| int | myRequestId |
| makVrf::DtBaseMessage::DtBaseMessage | ( | ) |
CTOR/DTOR.
|
virtual |
Get the name of the message type.
Encode the message as an array of bytes and return the bytes the receiver is responsible for calling delete [] on these bytes.
|
virtual |
this function needs to be in each derived class for decoding
Get the size of the message data in bytes
Reimplemented in makVrf::DtTerrainAreaResponse, makVrf::DtNavMeshAreaResponse, makVrf::DtFeatureResponse, makVrf::DtTerrainAreaRequest, makVrf::DtFeatureRequest, makVrf::DtNavMeshAreaRequest, and makVrf::DtHeartbeatMessage.
|
pure virtual |
clones this message. Caller of function is responsible for managing memory
Implemented in makVrf::DtTerrainAreaResponse, makVrf::DtNavMeshAreaResponse, makVrf::DtFeatureResponse, makVrf::DtTerrainAreaRequest, makVrf::DtFeatureRequest, makVrf::DtNavMeshAreaRequest, and makVrf::DtHeartbeatMessage.
|
virtual |
Assigns the requestor name of this message. If left at "" (default) then the DtRadarFxConnector's requestor() function is used to generate a name when the message is sent.
|
virtual |
|
virtual |
Assigns the request id of this message. If left at 0 (default) then the DtRadarFxConnector's nextId() function is used to generate a request id when the message is sent.
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |