ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::composite_actor< principal_actor_t, observers > Class Template Referencefinal

Composition of actors. More...

#include <detray/propagator/composite_actor.hpp>

Inheritance diagram for detray::composite_actor< principal_actor_t, observers >:
[legend]
Collaboration diagram for detray::composite_actor< principal_actor_t, observers >:
[legend]

Classes

struct  is_comp_actor
 Tag whether this is a composite type (hides the def in the actor). More...

Public Types

using actor_type = principal_actor_t
 The composite is an actor in itself.
using observer_state_refs
 Tuple of references to the observing actors' states.
using observer_states
 Tuple of states of observing actors.
using result = typename actor_type::result
 Result type produced by the principal actor.
using state = typename actor_type::state
 State type owned by the principal actor.

Public Member Functions

template<typename actor_states_t, typename propagator_state_t, typename subj_result_t = typename actor::empty_result>
void operator() (actor_states_t &states, propagator_state_t &p_state, subj_result_t &&subject_res={}) const
 Call to the implementation of the actor (the actor possibly being an observer itself).

Detailed Description

template<concepts::actor principal_actor_t = base_actor, concepts::actor... observers>
class detray::composite_actor< principal_actor_t, observers >

Composition of actors.

The composition represents an actor together with its observers. In addition to running its own implementation, it notifies its observing actors

Template Parameters
principal_actor_tthe actor the compositions implements itself.
observersa pack of observing actors that get called on the updated actor state of the compositions actor implementation.

Member Typedef Documentation

◆ actor_type

template<concepts::actor principal_actor_t = base_actor, concepts::actor... observers>
using detray::composite_actor< principal_actor_t, observers >::actor_type = principal_actor_t

The composite is an actor in itself.

Principal actor implementation wrapped by this composition.

◆ observer_state_refs

template<concepts::actor principal_actor_t = base_actor, concepts::actor... observers>
using detray::composite_actor< principal_actor_t, observers >::observer_state_refs
Initial value:
detail::tuple_cat_t<detail::state_ref_tuple_t<observers>...>

Tuple of references to the observing actors' states.

◆ observer_states

template<concepts::actor principal_actor_t = base_actor, concepts::actor... observers>
using detray::composite_actor< principal_actor_t, observers >::observer_states
Initial value:
detail::tuple_cat_t<detail::state_tuple_t<observers>...>

Tuple of states of observing actors.

Member Function Documentation

◆ operator()()

template<concepts::actor principal_actor_t = base_actor, concepts::actor... observers>
template<typename actor_states_t, typename propagator_state_t, typename subj_result_t = typename actor::empty_result>
void detray::composite_actor< principal_actor_t, observers >::operator() ( actor_states_t & states,
propagator_state_t & p_state,
subj_result_t && subject_res = {} ) const

Call to the implementation of the actor (the actor possibly being an observer itself).

First runs its own implementation, then passes the updated state to its observers.

Parameters
statesthe states of all actors in the chain
p_statethe state of the propagator (stepper and navigator)
subject_resthe result of the actor this actor observes. Uses a dummy type if this is not an observing actor.