ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::NavigationPolicyStateManager Class Reference

Manager class for navigation policy states. More...

#include <Acts/Navigation/INavigationPolicy.hpp>

Public Member Functions

NavigationPolicyState currentState ()
 Get the current (top) state from the stack.
void popState ()
 Remove the current state from the stack.
template<typename T, typename... Args>
T & pushState (Args &&... args)
 Push a new state onto the stack and construct it in-place.
void reset ()
 Completely reset the state manager by clearing the stack.

Detailed Description

Manager class for navigation policy states.

Maintains a stack of type-erased states and provides access to the current state. Navigation policies use this manager to push and pop their states during navigation.

Member Function Documentation

◆ currentState()

NavigationPolicyState Acts::NavigationPolicyStateManager::currentState ( )

Get the current (top) state from the stack.

Returns
NavigationPolicyState wrapper for the current state, or empty state if stack is empty

◆ popState()

void Acts::NavigationPolicyStateManager::popState ( )

Remove the current state from the stack.

Exceptions
std::runtime_errorif the stack is empty

◆ pushState()

template<typename T, typename... Args>
T & Acts::NavigationPolicyStateManager::pushState ( Args &&... args)

Push a new state onto the stack and construct it in-place.

Template Parameters
TThe type of state to create
ArgsThe types of the constructor arguments
Parameters
argsArguments to forward to the state constructor
Returns
Reference to the newly created state