VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::VrfScriptedEntitySetMessage Class Reference

Detailed Description

This class extends VrfScriptedEntityTaskMessage to specifically represent a message for setting entity attributes through a script. It uses the same attribute system as the base class but with a specific message type and ID. This specialization allows for targeted message routing and handling of entity attribute setting operations.

#include <vrfTaskEntityScript.h>

Inheritance diagram for makVre::VrfScriptedEntitySetMessage:
[legend]

Public Member Functions

virtual ~VrfScriptedEntitySetMessage () override
 
virtual const std::string & type () const override
 
virtual const makVre::DtVreMessageIdmessageId () const override
 
- Public Member Functions inherited from makVre::VrfScriptedEntityTaskMessage
virtual ~VrfScriptedEntityTaskMessage () override
 
virtual DtEntityIdentifier getEntityId () const
 
virtual void setEntityId (const DtEntityIdentifier &val)
 
virtual std::string getScriptName () const
 
virtual void setScriptName (const std::string &script)
 
virtual int getAttributeCount () const
 
BaseAttributegetAttribute (int i)
 
template<typename T>
void addAttribute (const std::string &name, T data)
 
virtual int messageSize () const override
 
- 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 const std::string & theType ()
 
static const makVre::DtVreMessageIdtheId ()
 
static DtVreMessagecreator ()
 
static VrfScriptedEntitySetMessagecreate ()
 
- Static Public Member Functions inherited from makVre::VrfScriptedEntityTaskMessage
static const std::string & theType ()
 
static const makVre::DtVreMessageIdtheId ()
 
static makVre::DtVreMessagedecode (char *buffer, int length)
 
static DtVreMessagecreator ()
 
static VrfScriptedEntityTaskMessagecreate ()
 

Protected Member Functions

 VrfScriptedEntitySetMessage ()
 
- Protected Member Functions inherited from makVre::VrfScriptedEntityTaskMessage
virtual void serialize (DtStreamWriter &writer) const override
 
virtual void deserialize (DtStreamReader &reader) override
 
 VrfScriptedEntityTaskMessage ()
 
template<typename T>
AttrType getType ()
 

Static Protected Attributes

static makVre::DtVreMessageId theMessageId
 
- Static Protected Attributes inherited from makVre::VrfScriptedEntityTaskMessage
static makVre::DtVreMessageId theMessageId
 

Additional Inherited Members

- Public Types inherited from makVre::VrfScriptedEntityTaskMessage
enum  AttrType {
  BOOL , INT , DOUBLE , STRING ,
  VECTOR , ENTITY_ID
}
 
- Protected Types inherited from makVre::VrfScriptedEntityTaskMessage
using AttributeList = std::vector<BaseAttribute*>
 
- Protected Attributes inherited from makVre::VrfScriptedEntityTaskMessage
DtEntityIdentifier myEntityId
 
std::string myScriptName
 
AttributeList myAttributes
 
- Protected Attributes inherited from makVre::DtVreMessage
double myDelay
 
UInt64 myApplicationId
 
UInt64 myVersion
 

Constructor & Destructor Documentation

◆ ~VrfScriptedEntitySetMessage()

virtual makVre::VrfScriptedEntitySetMessage::~VrfScriptedEntitySetMessage ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the message. The base class destructor handles cleanup of the attribute objects.

◆ VrfScriptedEntitySetMessage()

makVre::VrfScriptedEntitySetMessage::VrfScriptedEntitySetMessage ( )
protected

Protected constructor.

Initializes a new message with default values. This constructor is protected to enforce the use of the static create() method for creating new instances.

Referenced by create().

Member Function Documentation

◆ theType()

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

◆ theId()

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

◆ type()

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

Get the name of the message type.

Reimplemented from makVre::VrfScriptedEntityTaskMessage.

◆ messageId()

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

Gets the message ID object.

Returns
Reference to the message ID object

This pure virtual method must be implemented by derived classes to return a unique identifier object for the message. The message ID contains both the type name and a hash value for efficient routing.

Reimplemented from makVre::VrfScriptedEntityTaskMessage.

◆ creator()

static DtVreMessage * makVre::VrfScriptedEntitySetMessage::creator ( )
static

Creates a new instance of this message type as a DtVreMessage.

Returns
Pointer to a newly created message

This static method is used by the message factory to create instances of this message type. It returns a base message pointer that must be cast to the appropriate type by the caller.

◆ create()

static VrfScriptedEntitySetMessage * makVre::VrfScriptedEntitySetMessage::create ( )
static

Creates a new instance of this message type.

Returns
Pointer to a newly created message of this specific type

This static method creates a new instance of this message type and returns a pointer to the specific message type, avoiding the need for casting by the caller.

References VrfScriptedEntitySetMessage().

Member Data Documentation

◆ theMessageId

makVre::DtVreMessageId makVre::VrfScriptedEntitySetMessage::theMessageId
staticprotected

Static message ID for this message type.

This static member holds the unique identifier for this message type.


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