|
ACTS
Experiment-independent tracking
|
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). | |
| NavigationPolicyState | atIndex (std::size_t index) const |
| Access another state managed by the same manager, by absolute stack index. | |
| bool | empty () const |
| Check if the state is empty (not associated with a manager). | |
| std::size_t | index () const |
| Absolute index of this state within its manager's state stack. | |
| bool | isDefault () const |
| Whether this state is the default sentinel, i.e. | |
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, small-buffer optimized value (NavigationPolicyStateStorage) in the NavigationPolicyStateManager.
| T & Acts::NavigationPolicyState::as | ( | ) |
Cast the state to a specific type.
| T | The type to cast to |
| const T & Acts::NavigationPolicyState::as | ( | ) | const |
Cast the state to a specific type (const version).
| T | The type to cast to |
| NavigationPolicyState Acts::NavigationPolicyState::atIndex | ( | std::size_t | index | ) | const |
Access another state managed by the same manager, by absolute stack index.
Composite policies use this to reach their child states, which are pushed contiguously onto the stack directly below the composite's own state.
| index | absolute stack index of the state to access |
index in the same manager | bool Acts::NavigationPolicyState::empty | ( | ) | const |
Check if the state is empty (not associated with a manager).
| std::size_t Acts::NavigationPolicyState::index | ( | ) | const |
Absolute index of this state within its manager's state stack.
| bool Acts::NavigationPolicyState::isDefault | ( | ) | const |
Whether this state is the default sentinel, i.e.
either no state at all or the INavigationPolicy::EmptyState pushed by policies that do not override createState(). Such policies also use the default (always-true) isValid(), so the navigator treats a default state as "no validity
constraint" and skips the per-step isValid() call. A policy with a meaningful isValid() necessarily pushes a real state to check against, so this signal cannot be forgotten.