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

Detailed Description

DtSelectConnectionState is the application state where users select which network protocol to use for connecting to a simulation federation. The state presents a UI where users can choose from available protocols like DIS, HLA, or TENA, and handles the loading of the appropriate connection driver based on their selection.

#include <selectConnectionState.h>

Inheritance diagram for makVre::DtSelectConnectionState:
[legend]

Public Member Functions

 DtSelectConnectionState (DtPlayerStationApp &app)
 
virtual ~DtSelectConnectionState () override
 
virtual void tick (double dt) override
 
virtual void onEnter (const DtPlayerStationStateArgs *args) override
 
virtual void onExit () override
 
- Public Member Functions inherited from makVre::DtPlayerStationState
 DtPlayerStationState (DtPlayerStationApp &app, std::string stateType)
 
virtual ~DtPlayerStationState ()
 
 DtPlayerStationState (const DtPlayerStationState &)=delete
 
DtPlayerStationStateoperator= (const DtPlayerStationState &)=delete
 
virtual void onEnter ()
 
virtual void onStacked ()
 
virtual void onExposed (const DtPlayerStationStateArgs *args)
 
virtual void onExposed ()
 
bool active () const
 
bool exposed () const
 
bool exiting () const
 
bool stacking () const
 
const std::string & stateType () const
 
DtPlayerStationAppapp () const
 

Protected Member Functions

virtual DtVreMessageResult handleNetworkConnected (DtVreMessage *msg)
 
virtual DtVreMessageResult handleBackButtonClicked (DtVreMessage *msg)
 
- Protected Member Functions inherited from makVre::DtPlayerStationState
bool pushState (const std::string &newState, DtPlayerStationStateArgs *args=NULL)
 
bool popSelf ()
 
bool popUntilSelf ()
 
bool popUntilState (const std::string &parentState, DtPlayerStationStateArgs *args=NULL)
 
bool switchToState (const std::string &newState, DtPlayerStationStateArgs *args=NULL)
 
bool pushSelf ()
 

Protected Attributes

std::shared_ptr< DtVreSelectConnectionPagemySelectConnectionPage
 
bool myConnectionReady
 
- Protected Attributes inherited from makVre::DtPlayerStationState
DtPlayerStationAppmyApp
 

Constructor & Destructor Documentation

◆ DtSelectConnectionState()

makVre::DtSelectConnectionState::DtSelectConnectionState ( DtPlayerStationApp & app)

Constructor.

Parameters
appReference to the player station application

Creates a new connection selection state associated with the given application. This state is typically entered after the initialization state.

References makVre::DtPlayerStationState::app().

◆ ~DtSelectConnectionState()

virtual makVre::DtSelectConnectionState::~DtSelectConnectionState ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of connection selection state resources.

Member Function Documentation

◆ tick()

virtual void makVre::DtSelectConnectionState::tick ( double dt)
overridevirtual

Updates the state each frame.

Parameters
dtTime in seconds since the last update

Monitors the connection selection process, updates UI elements with status information, and transitions to the next state when a protocol is selected and the connection driver is loaded.

Reimplemented from makVre::DtPlayerStationState.

◆ onEnter()

virtual void makVre::DtSelectConnectionState::onEnter ( const DtPlayerStationStateArgs * args)
overridevirtual

Called when the state is entered.

Parameters
argsPointer to arguments from the previous state

Sets up the connection selection UI, and performs any necessary preparations for protocol selection. Takes initialization information from the previous state's arguments if available.

Reimplemented from makVre::DtPlayerStationState.

◆ onExit()

virtual void makVre::DtSelectConnectionState::onExit ( )
overridevirtual

Called when the state is exited.

Cleans up resources, hides UI elements, and prepares for the transition to the network connected state or back to the initialization state.

Reimplemented from makVre::DtPlayerStationState.

◆ handleNetworkConnected()

virtual DtVreMessageResult makVre::DtSelectConnectionState::handleNetworkConnected ( DtVreMessage * msg)
protectedvirtual

Handles network connection status messages.

Parameters
msgPointer to the network connected message
Returns
Message handling result

Processes notifications about successful network connection establishment. When a connection is successfully established, this handler prepares for the transition to the network connected state.

◆ handleBackButtonClicked()

virtual DtVreMessageResult makVre::DtSelectConnectionState::handleBackButtonClicked ( DtVreMessage * msg)
protectedvirtual

Handles back button click messages.

Parameters
msgPointer to the button click message
Returns
Message handling result

Processes back button clicks in the connection selection UI, typically returning to the initialization state when the user decides to go back.

Member Data Documentation

◆ mySelectConnectionPage

std::shared_ptr<DtVreSelectConnectionPage> makVre::DtSelectConnectionState::mySelectConnectionPage
protected

UI page for connection selection.

Provides the user interface where users can select the network protocol and configure connection settings.

◆ myConnectionReady

bool makVre::DtSelectConnectionState::myConnectionReady
protected

Flag indicating whether a connection is ready.

When true, indicates that a connection driver has been successfully loaded and the application is ready to transition to the network connected state.


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