VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::VrfTextMessage Class Reference

Detailed Description

Receiver will be null if broadcast.

Message type: "admin.textMessage"

Note
This is an auto-generated class. Do not modify directly.

#include <vrfTextMessage.h>

Inheritance diagram for makVre::VrfTextMessage:
[legend]

Classes

struct  VrfTextData
 

Public Member Functions

virtual ~VrfTextMessage () override
 
Accessors
virtual const std::string & getMessage () const
 
virtual void setMessage (const std::string &val)
 
virtual double getTime () const
 
virtual void setTime (double val)
 
virtual const DtEntityIdentifier & getSenderEntityID () const
 
virtual void setSenderEntityID (const DtEntityIdentifier &val)
 
virtual const DtEntityIdentifier & getReceiverEntityID () const
 
virtual void setReceiverEntityID (const DtEntityIdentifier &val)
 
Operators
bool operator== (const VrfTextMessage &rhs) const
 
bool operator!= (const VrfTextMessage &rhs) const
 
- Public Member Functions inherited from makVre::DtVreMessage
 DtVreMessage ()
 
virtual ~DtVreMessage ()
 
virtual char * encode ()
 
virtual void encode (char *buffer, int bufferSize)
 
virtual const UInt64 originatingApplicationId () const
 
virtual void setOriginatingApplicationId (UInt64 appId)
 
virtual void setDelay (double delay)
 
virtual bool isDelayed ()
 
virtual void reduceDelay (double dt)
 
virtual const UInt64 versionNumber () const
 

Static Public Member Functions

Static Creators

Create a new default instance.

Returns
A dynamically allocated default message. Caller takes ownership.
static VrfTextMessage * create ()
 
static VrfTextMessage * createFrom (VrfTextMessage *origMsg)
 
static VrfTextMessage * createFromData (const VrfTextData data)
 

Protected Member Functions

 VrfTextMessage ()
 
virtual void serialize (DtStreamWriter &writer) const override
 
virtual void deserialize (DtStreamReader &reader) override
 

Protected Attributes

VrfTextData myData
 
- Protected Attributes inherited from makVre::DtVreMessage
double myDelay
 
UInt64 myApplicationId
 
UInt64 myVersion
 

Static Protected Attributes

static makVre::DtVreMessageId theMessageId
 
static UInt64 theVersion
 

Type Identity

Get the message type string for this message class.

virtual const std::string & type () const override
 
virtual const makVre::DtVreMessageId & messageId () const override
 
static const std::string & theType ()
 
static const makVre::DtVreMessageId & theId ()
 
static UInt64 theVersionNumber ()
 

Serialization

Static decode function pattern for derived classes.

Note
Each derived class must implement a static decode function with the signature:
static DtVreMessage* decode(unsigned char* buffer, int length);
DtVreMessage()
Default constructor.
static makVre::DtVreMessage * decode(char *buffer, int length)
Decode a message from a byte buffer.
This function is used by the message factory to create messages from raw data.

Gets the total size of the serialized message in bytes

Returns
Size of the message in bytes

This method calculates the total size of the message when serialized, including the base message header (message size, type hash, application ID, version, and delay) and any data added by derived classes.

Derived classes should override this method to include their own data size while calling the base class implementation.

virtual int messageSize () const override
 
VrfTextData getData ()
 
VrfTextData getData () const
 
static makVre::DtVreMessage * decode (char *buffer, int length)
 

Constructor & Destructor Documentation

◆ ~VrfTextMessage()

virtual makVre::VrfTextMessage::~VrfTextMessage ( )
overridevirtual

Destructor.

◆ VrfTextMessage()

makVre::VrfTextMessage::VrfTextMessage ( )
protected

Member Function Documentation

◆ create()

static VrfTextMessage * makVre::VrfTextMessage::create ( )
static

Create a copy of the given message.

Parameters
origMsgThe message to copy. Must not be null.
Returns
A dynamically allocated copy. Caller takes ownership.

References VrfTextMessage().

◆ createFrom()

static VrfTextMessage * makVre::VrfTextMessage::createFrom ( VrfTextMessage * origMsg)
static

Create a copy of the given message.

Parameters
origMsgThe message to copy. Must not be null.
Returns
A dynamically allocated copy. Caller takes ownership.

References VrfTextMessage().

◆ createFromData()

static VrfTextMessage * makVre::VrfTextMessage::createFromData ( const VrfTextData data)
static

Create a new message initialized with the given data.

Parameters
dataThe data payload to initialize the message with.
Returns
A dynamically allocated message. Caller takes ownership.

References VrfTextMessage().

◆ theType()

static const std::string & makVre::VrfTextMessage::theType ( )
static

Get the message type string for this instance.

◆ theId()

static const makVre::DtVreMessageId & makVre::VrfTextMessage::theId ( )
static

Get the message identifier for this message class.

◆ theVersionNumber()

static UInt64 makVre::VrfTextMessage::theVersionNumber ( )
static

Get the version number for this message class.

◆ type()

virtual const std::string & makVre::VrfTextMessage::type ( ) const
overridevirtual

Get the message type string for this instance.

Implements makVre::DtVreMessage.

◆ messageId()

virtual const makVre::DtVreMessageId & makVre::VrfTextMessage::messageId ( ) const
overridevirtual

Get the message identifier for this instance.

Implements makVre::DtVreMessage.

◆ getMessage()

virtual const std::string & makVre::VrfTextMessage::getMessage ( ) const
virtual

◆ setMessage()

virtual void makVre::VrfTextMessage::setMessage ( const std::string & val)
virtual

◆ getTime()

virtual double makVre::VrfTextMessage::getTime ( ) const
virtual

◆ setTime()

virtual void makVre::VrfTextMessage::setTime ( double val)
virtual

◆ getSenderEntityID()

virtual const DtEntityIdentifier & makVre::VrfTextMessage::getSenderEntityID ( ) const
virtual

◆ setSenderEntityID()

virtual void makVre::VrfTextMessage::setSenderEntityID ( const DtEntityIdentifier & val)
virtual

◆ getReceiverEntityID()

virtual const DtEntityIdentifier & makVre::VrfTextMessage::getReceiverEntityID ( ) const
virtual

◆ setReceiverEntityID()

virtual void makVre::VrfTextMessage::setReceiverEntityID ( const DtEntityIdentifier & val)
virtual

◆ messageSize()

virtual int makVre::VrfTextMessage::messageSize ( ) const
overridevirtual

Get a copy of the message data.

Reimplemented from makVre::DtVreMessage.

◆ decode()

static makVre::DtVreMessage * makVre::VrfTextMessage::decode ( char * buffer,
int length )
static

Decode a message from a byte buffer.

Parameters
bufferThe raw byte buffer to decode from.
lengthThe length of the buffer in bytes.
Returns
A dynamically allocated decoded message. Caller takes ownership.

◆ getData() [1/2]

VrfTextData makVre::VrfTextMessage::getData ( )

Get a copy of the message data.

◆ getData() [2/2]

VrfTextData makVre::VrfTextMessage::getData ( ) const

Get a copy of the message data (const).

◆ operator==()

bool makVre::VrfTextMessage::operator== ( const VrfTextMessage & rhs) const

References VrfTextMessage().

◆ operator!=()

bool makVre::VrfTextMessage::operator!= ( const VrfTextMessage & rhs) const

References VrfTextMessage().

◆ serialize()

virtual void makVre::VrfTextMessage::serialize ( DtStreamWriter & writer) const
overrideprotectedvirtual

Serializes the message to a stream writer.

Parameters
writerReference to the stream writer

This method writes the message header fields to the stream writer. Derived classes should override this method to add their own fields while calling the base class implementation.

Reimplemented from makVre::DtVreMessage.

◆ deserialize()

virtual void makVre::VrfTextMessage::deserialize ( DtStreamReader & reader)
overrideprotectedvirtual

Deserializes the message from a stream reader.

Parameters
readerReference to the stream reader

This method reads the message header fields from the stream reader. Derived classes should override this method to read their own fields while calling the base class implementation.

Reimplemented from makVre::DtVreMessage.

Member Data Documentation

◆ theMessageId

makVre::DtVreMessageId makVre::VrfTextMessage::theMessageId
staticprotected

◆ theVersion

UInt64 makVre::VrfTextMessage::theVersion
staticprotected

◆ myData

VrfTextData makVre::VrfTextMessage::myData
protected

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