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

Detailed Description

This class provides a mechanism for setting and persisting information about the role a user has selected when embarking an entity. This ensures consistent role allocation when the same user reconnects to the simulation.

#include <setVreEmbarkedRole.h>

Inheritance diagram for makVre::DtSetVreEmbarkedRoleRequest:
[legend]

Public Member Functions

 DtSetVreEmbarkedRoleRequest ()
 
 DtSetVreEmbarkedRoleRequest (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtSetVreEmbarkedRoleRequest (const DtString &writeName, const DtSetVreEmbarkedRoleRequest &orig, DtReaderWriterRegistry *parentRegistry=0)
 
const DtSetVreEmbarkedRoleRequestoperator= (const DtSetVreEmbarkedRoleRequest &orig)
 
virtual ~DtSetVreEmbarkedRoleRequest () override
 
virtual const DtSetMessageType & type () const override
 
virtual DtSetDataRequest * clone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual DtString stringRep () const override
 
virtual DtString engageEmbarkedStation () const
 
virtual void setEngageEmbarkedStation (const DtString &station)
 
virtual int netRepSize () const override
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize) override
 
virtual bool setToNet () override
 

Static Public Member Functions

static DtSetDataRequest * creator ()
 

Protected Attributes

DtRwString myStation
 

Constructor & Destructor Documentation

◆ DtSetVreEmbarkedRoleRequest() [1/3]

makVre::DtSetVreEmbarkedRoleRequest::DtSetVreEmbarkedRoleRequest ( )

Default constructor.

Initializes an empty embarked role request message.

Referenced by DtSetVreEmbarkedRoleRequest(), and operator=().

◆ DtSetVreEmbarkedRoleRequest() [2/3]

makVre::DtSetVreEmbarkedRoleRequest::DtSetVreEmbarkedRoleRequest ( const DtString & writeName,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor with write name.

Parameters
writeNameThe name to identify this request
parentRegistryOptional reader-writer registry for serialization

If you have a request 'put' itself, the writeName will preface it.

◆ DtSetVreEmbarkedRoleRequest() [3/3]

makVre::DtSetVreEmbarkedRoleRequest::DtSetVreEmbarkedRoleRequest ( const DtString & writeName,
const DtSetVreEmbarkedRoleRequest & orig,
DtReaderWriterRegistry * parentRegistry = 0 )

Copy constructor with new name.

Parameters
writeNameThe name to identify this request
origThe embarked role request to copy from
parentRegistryOptional reader-writer registry for serialization

Creates a new embarked role request by copying an existing one.

References DtSetVreEmbarkedRoleRequest().

◆ ~DtSetVreEmbarkedRoleRequest()

virtual makVre::DtSetVreEmbarkedRoleRequest::~DtSetVreEmbarkedRoleRequest ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ operator=()

const DtSetVreEmbarkedRoleRequest & makVre::DtSetVreEmbarkedRoleRequest::operator= ( const DtSetVreEmbarkedRoleRequest & orig)

Assignment operator.

Parameters
origThe embarked role request to copy from
Returns
Reference to this object after assignment

Copies the contents of another embarked role request into this one.

References DtSetVreEmbarkedRoleRequest().

◆ type()

virtual const DtSetMessageType & makVre::DtSetVreEmbarkedRoleRequest::type ( ) const
overridevirtual

Gets the request message type.

Returns
The message type identifier

Returns DtSetVreEmbarkedRoleType as defined in this file.

◆ clone()

virtual DtSetDataRequest * makVre::DtSetVreEmbarkedRoleRequest::clone ( const DtString & name,
DtReaderWriterRegistry * parentRegistry = 0 ) const
overridevirtual

Creates a copy of this request.

Parameters
nameThe name to assign to the new request
parentRegistryOptional reader-writer registry for serialization
Returns
Pointer to the newly created request

Creates a dynamically allocated copy of this request with a new name.

◆ stringRep()

virtual DtString makVre::DtSetVreEmbarkedRoleRequest::stringRep ( ) const
overridevirtual

Gets a readable string representation of this request.

Returns
String representation of the request

Returns a human-readable representation of the request contents.

◆ engageEmbarkedStation()

virtual DtString makVre::DtSetVreEmbarkedRoleRequest::engageEmbarkedStation ( ) const
virtual

Gets the role in which the entity was embarked.

Returns
The embarked station/role name

Returns the name of the role (e.g., "gunner", "driver", "commander") that was used when embarking the entity.

◆ setEngageEmbarkedStation()

virtual void makVre::DtSetVreEmbarkedRoleRequest::setEngageEmbarkedStation ( const DtString & station)
virtual

Sets the role in which the entity was embarked.

Parameters
stationThe embarked station/role name to set

Sets the name of the role (e.g., "gunner", "driver", "commander") that was used when embarking the entity.

◆ netRepSize()

virtual int makVre::DtSetVreEmbarkedRoleRequest::netRepSize ( ) const
overridevirtual

Gets the network representation size.

Returns
Size in bytes of the network representation

Returns the size of the full network representation padded to an 8-byte boundary.

◆ setFromNet()

virtual bool makVre::DtSetVreEmbarkedRoleRequest::setFromNet ( const char * contentBuffer,
unsigned contentSize )
overridevirtual

Deserializes the request from a network buffer.

Parameters
contentBufferPointer to the network buffer
contentSizeSize of the buffer in bytes
Returns
True if deserialization was successful

Fills in the request from the provided network buffer.

◆ setToNet()

virtual bool makVre::DtSetVreEmbarkedRoleRequest::setToNet ( )
overridevirtual

Serializes the request for network transmission.

Returns
True if serialization was successful

Fills in the network buffer (created by base class setDataRequest) with the set data request contents.

◆ creator()

static DtSetDataRequest * makVre::DtSetVreEmbarkedRoleRequest::creator ( )
static

Static creator function for factory registration.

Returns
Pointer to a new instance of DtSetVreEmbarkedRoleRequest

This static function is used for registration with the message factory.

Member Data Documentation

◆ myStation

DtRwString makVre::DtSetVreEmbarkedRoleRequest::myStation
protected

The embarked station/role name.

Stores the name of the role (e.g., "gunner", "driver", "commander") that was used when embarking the entity.


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