VR-Engage  2.2
Loading...
Searching...
No Matches
DtIfAssignRolePlayer Class Reference

Detailed Description

Instances of DtIfAssignRolePlayer messages are sent out by a VRF GUI application to assign a player to an entity at a particular VREngage station. This message includes information about the player's station/role, the entity to control, and viewing mode settings.

#include <ifAssignRolePlayer.h>

Inheritance diagram for DtIfAssignRolePlayer:
[legend]

Public Member Functions

 DtIfAssignRolePlayer ()
 
virtual ~DtIfAssignRolePlayer () override
 
 DtIfAssignRolePlayer (const DtIfAssignRolePlayer &orig)
 
DtIfAssignRolePlayeroperator= (const DtIfAssignRolePlayer &orig)
 
virtual int type () const override
 
virtual DtSimInterfaceContent * clone () const override
 
virtual void setId (unsigned long id)
 
virtual unsigned long id () const
 
virtual void setUUID (const DtString &uuid)
 
virtual DtString uuid () const
 
virtual void setStationName (const DtString &name)
 
virtual DtString stationName () const
 
virtual void setSpectatorMode (bool mode)
 
virtual bool spectatorMode () const
 
virtual int netRepSize () const override
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize) override
 
virtual bool setToNet () override
 
virtual void printDataToString (DtString &str) override
 

Static Public Member Functions

static DtSimInterfaceContent * creator ()
 

Protected Attributes

DtU32 myVersion
 
DtU64 myId
 
DtString myUUID
 
DtString myStationName
 
bool mySpectatorMode
 

Constructor & Destructor Documentation

◆ DtIfAssignRolePlayer() [1/2]

DtIfAssignRolePlayer::DtIfAssignRolePlayer ( )

Default constructor.

Initializes an empty assign role player message.

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

◆ ~DtIfAssignRolePlayer()

virtual DtIfAssignRolePlayer::~DtIfAssignRolePlayer ( )
overridevirtual

Virtual destructor.

◆ DtIfAssignRolePlayer() [2/2]

DtIfAssignRolePlayer::DtIfAssignRolePlayer ( const DtIfAssignRolePlayer & orig)

Copy constructor.

Parameters
origThe assign role player message to copy from

Creates a new assign role player message by copying an existing one.

References DtIfAssignRolePlayer().

Member Function Documentation

◆ operator=()

DtIfAssignRolePlayer & DtIfAssignRolePlayer::operator= ( const DtIfAssignRolePlayer & orig)

Assignment operator.

Parameters
origThe assign role player message to copy from
Returns
Reference to this object after assignment

Copies the contents of another assign role player message into this one.

References DtIfAssignRolePlayer().

◆ type()

virtual int DtIfAssignRolePlayer::type ( ) const
overridevirtual

Gets the interface message type.

Returns
The message type identifier

Returns DtAssignRolePlayerMessageType as defined in vreVrfMessageTypes.h.

◆ clone()

virtual DtSimInterfaceContent * DtIfAssignRolePlayer::clone ( ) const
overridevirtual

Creates a copy of this message.

Returns
Pointer to the new copy

Creates a dynamically allocated copy of this message.

◆ setId()

virtual void DtIfAssignRolePlayer::setId ( unsigned long id)
virtual

Sets the identifier of the VREngage application.

Parameters
idThe unique identifier to set

Sets the unique identifier for the VREngage application. This must be unique across all VREngage stations in an exercise and must not change over the lifetime of the application.

◆ id()

virtual unsigned long DtIfAssignRolePlayer::id ( ) const
virtual

Gets the identifier of the VREngage application.

Returns
The VREngage application identifier

◆ setUUID()

virtual void DtIfAssignRolePlayer::setUUID ( const DtString & uuid)
virtual

Sets the UUID of the entity to be controlled.

Parameters
uuidThe entity UUID to set

Sets the UUID of the entity to be controlled at the VREngage station.

References uuid().

◆ uuid()

virtual DtString DtIfAssignRolePlayer::uuid ( ) const
virtual

Gets the UUID of the entity to be controlled.

Returns
The entity UUID

Referenced by setUUID().

◆ setStationName()

virtual void DtIfAssignRolePlayer::setStationName ( const DtString & name)
virtual

Sets the station/role name for the player.

Parameters
nameThe station name to set

Sets the station name (role) to be assumed by the player at the VREngage station. Available string identifiers for roles are defined in the .entity file.

◆ stationName()

virtual DtString DtIfAssignRolePlayer::stationName ( ) const
virtual

Gets the station/role name for the player.

Returns
The station name

◆ setSpectatorMode()

virtual void DtIfAssignRolePlayer::setSpectatorMode ( bool mode)
virtual

Sets the spectator mode flag.

Parameters
modeTrue for spectator mode, false for active player mode

Sets whether the player at the VREngage station is in spectator mode. In spectator mode, the player can observe but not interact with the entity.

◆ spectatorMode()

virtual bool DtIfAssignRolePlayer::spectatorMode ( ) const
virtual

Gets the spectator mode flag.

Returns
True if in spectator mode, false otherwise

◆ netRepSize()

virtual int DtIfAssignRolePlayer::netRepSize ( ) const
overridevirtual

Gets the network representation size.

Returns
Size in bytes of the network representation

Returns the size of the network buffer needed to store this message.

◆ setFromNet()

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

Deserializes the message from a network buffer.

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

Fills the message from the provided network buffer.

◆ setToNet()

virtual bool DtIfAssignRolePlayer::setToNet ( )
overridevirtual

Serializes the message for network transmission.

Returns
True if serialization was successful

Prepares the message for network transmission.

◆ printDataToString()

virtual void DtIfAssignRolePlayer::printDataToString ( DtString & str)
overridevirtual

Formats the message data as a string.

Parameters
strString to store the formatted message data

Appends a human-readable representation of the message to the provided string.

◆ creator()

static DtSimInterfaceContent * DtIfAssignRolePlayer::creator ( )
static

Static creator function for factory registration.

Returns
Pointer to a new instance of DtIfAssignRolePlayer

This static function is used for registration with DtInterfaceContentFactory.

Member Data Documentation

◆ myVersion

DtU32 DtIfAssignRolePlayer::myVersion
protected

Version information for the message.

The high word is a signal that the version exists, and the low word is the actual version. If this information does not exist, it is assumed to be an older status message.

◆ myId

DtU64 DtIfAssignRolePlayer::myId
protected

Unique identifier for the VREngage application.

Must be unique across all VREngage stations in an exercise and must not change over the lifetime of the application.

◆ myUUID

DtString DtIfAssignRolePlayer::myUUID
protected

UUID of the entity to be controlled.

◆ myStationName

DtString DtIfAssignRolePlayer::myStationName
protected

Station/role name for the player.

Station name to be assumed by the player at the VREngage station (defined in the .entity file).

◆ mySpectatorMode

bool DtIfAssignRolePlayer::mySpectatorMode
protected

Flag indicating whether player is in spectator mode.

When true, the player can observe but not interact with the entity.


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