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

Detailed Description

DtPlayerStationStateArgs provides a mechanism to pass information from one state to another during state transitions. It includes the source state name and an optional message containing additional data.

#include <playerStationState.h>

Public Member Functions

 DtPlayerStationStateArgs (const std::string &fromStateType, DtVreMessage *message=NULL)
 
 DtPlayerStationStateArgs (const std::string &fromStateType, std::shared_ptr< DtVreMessage > message)
 
const std::string & fromState () const
 
const DtVreMessagemessage () const
 
std::shared_ptr< DtVreMessagemessage_ptr () const
 

Private Attributes

std::string myFromState
 
std::shared_ptr< DtVreMessagemyMessage
 

Constructor & Destructor Documentation

◆ DtPlayerStationStateArgs() [1/2]

makVre::DtPlayerStationStateArgs::DtPlayerStationStateArgs ( const std::string & fromStateType,
DtVreMessage * message = NULL )

Constructor with raw message pointer.

Parameters
fromStateTypeName of the source state
messageOptional pointer to a message with additional data

Creates a state arguments object, taking ownership of the message if provided

References message().

◆ DtPlayerStationStateArgs() [2/2]

makVre::DtPlayerStationStateArgs::DtPlayerStationStateArgs ( const std::string & fromStateType,
std::shared_ptr< DtVreMessage > message )

Constructor with shared pointer to message.

Parameters
fromStateTypeName of the source state
messageShared pointer to a message with additional data

References message().

Member Function Documentation

◆ fromState()

const std::string & makVre::DtPlayerStationStateArgs::fromState ( ) const

Gets the name of the source state.

Returns
Reference to the source state name

◆ message()

const DtVreMessage * makVre::DtPlayerStationStateArgs::message ( ) const

Gets the message as a raw pointer.

Returns
Raw pointer to the message, or NULL if not present

Referenced by DtPlayerStationStateArgs(), and DtPlayerStationStateArgs().

◆ message_ptr()

std::shared_ptr< DtVreMessage > makVre::DtPlayerStationStateArgs::message_ptr ( ) const

Gets the message as a shared pointer.

Returns
Shared pointer to the message

Member Data Documentation

◆ myFromState

std::string makVre::DtPlayerStationStateArgs::myFromState
private

Name of the source state.

◆ myMessage

std::shared_ptr<DtVreMessage> makVre::DtPlayerStationStateArgs::myMessage
private

Shared pointer to the optional message.


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