62 using DtQueuedOp = std::tuple<DtStackOp, std::string, std::shared_ptr<DtPlayerStationStateArgs>>;
90 virtual void tick(
double dt);
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Class for passing arguments during state transitions.
Definition playerStationState.h:45
Base class for all VR-Engage application states.
Definition playerStationState.h:86
virtual void transition(const std::string &state, DtPlayerStationStateArgs *args=NULL)
Queues a state to transition from the current active state.
friend class DtPlayerStationApp
Definition playerStationStateManager.h:170
DtPlayerStationStateManager & operator=(const DtPlayerStationStateManager &)=delete
Deleted assignment operator.
std::map< std::string, DtPlayerStationState * > DtRegisteredStates
Type definition for the map of registered states.
Definition playerStationStateManager.h:48
virtual void pop()
Queues an operation to pop the active state off the stack.
std::tuple< DtStackOp, std::string, std::shared_ptr< DtPlayerStationStateArgs > > DtQueuedOp
Type definition for a queued state operation Contains operation type, state name, and arguments.
Definition playerStationStateManager.h:62
void doTransition(const std::string &toState, const DtPlayerStationStateArgs *args)
Performs a state transition operation.
DtPlayerStationState * getState(const std::string &state)
Gets a state by its name.
bool isRegistered(const std::string &state)
Checks if a state is registered.
DtPlayerStationStateManager(const DtPlayerStationStateManager &)=delete
Deleted copy constructor.
virtual void popUntil(const std::string &state, DtPlayerStationStateArgs *args=NULL)
Queues an operation to pop states until a specific state is exposed.
const void debugDumpDeque()
Dumps the contents of the operation queue for debugging.
virtual DtPlayerStationState * currentState()
Gets the currently active state.
void doPop(const DtPlayerStationStateArgs *args=NULL)
Performs a pop operation on the state stack.
void doPopUntil(const std::string &exposeState, const DtPlayerStationStateArgs *args)
Performs a popUntil operation on the state stack.
std::deque< DtQueuedOp > DtStackOpQueue
Type definition for the queue of state operations.
Definition playerStationStateManager.h:65
virtual bool containsStateType(const std::string &state)
Checks if a specific state type is in the stack.
DtStateList myStateStack
The state stack.
Definition playerStationStateManager.h:228
DtStackOp
Enumeration of possible stack operations.
Definition playerStationStateManager.h:52
@ OP_PUSH
Push a new state onto the stack.
Definition playerStationStateManager.h:54
@ OP_POP
Pop the top state from the stack.
Definition playerStationStateManager.h:56
@ OP_TRANSITION
Replace the current state.
Definition playerStationStateManager.h:55
@ OP_POP_UNTIL
Pop states until a specific state is at the top.
Definition playerStationStateManager.h:57
@ NO_OP
No operation.
Definition playerStationStateManager.h:53
DtPlayerStationApp & myApp
Reference to the player station application.
Definition playerStationStateManager.h:238
std::list< DtPlayerStationState * > DtStateList
Type definition for the state stack.
Definition playerStationStateManager.h:45
int findStackPos(const std::string &state)
Finds the position of a state in the stack.
friend class DtVreDebugManager
Definition playerStationStateManager.h:171
virtual void debugCallback()
Debug callback function.
void doPush(const std::string &newState, const DtPlayerStationStateArgs *args)
Performs a push operation on the state stack.
DtStackOpQueue myStackOpQueue
Queue of pending state operations.
Definition playerStationStateManager.h:244
virtual void registerState(DtPlayerStationState *state)
Registers a new state with the manager.
virtual ~DtPlayerStationStateManager()
Virtual destructor.
virtual void tick(double dt)
Main tick function called from the player station tick.
DtPlayerStationStateManager(DtPlayerStationApp &app)
Constructor.
DtRegisteredStates myRegisteredStates
Map of all registered states.
Definition playerStationStateManager.h:233
virtual void push(const std::string &state, DtPlayerStationStateArgs *args=NULL)
Queues a state to push onto the stack.
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49