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

Wrapper class for a navigation policy state stored in the state manager. More...

#include <Acts/Navigation/INavigationPolicy.hpp>

Public Member Functions

template<typename T>
T & as ()
 Cast the state to a specific type.
template<typename T>
const T & as () const
 Cast the state to a specific type (const version).
bool empty () const
 Check if the state is empty (not associated with a manager).

Detailed Description

Wrapper class for a navigation policy state stored in the state manager.

This class provides type-safe access to the underlying state through the as<T>() method. The state is stored as a type-erased std::any in the NavigationPolicyStateManager.

Member Function Documentation

◆ as() [1/2]

template<typename T>
T & Acts::NavigationPolicyState::as ( )

Cast the state to a specific type.

Template Parameters
TThe type to cast to
Returns
Reference to the state as type T

◆ as() [2/2]

template<typename T>
const T & Acts::NavigationPolicyState::as ( ) const

Cast the state to a specific type (const version).

Template Parameters
TThe type to cast to
Returns
Const reference to the state as type T

◆ empty()

bool Acts::NavigationPolicyState::empty ( ) const

Check if the state is empty (not associated with a manager).

Returns
True if the state is empty, false otherwise