File indexing completed on 2025-01-18 09:27:44
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Propagator/detail/action_list_implementation.hpp"
0012 #include "Acts/Utilities/detail/Extendable.hpp"
0013 #include "Acts/Utilities/detail/MPL/all_of.hpp"
0014 #include "Acts/Utilities/detail/MPL/has_duplicates.hpp"
0015 #include "Acts/Utilities/detail/MPL/type_collector.hpp"
0016
0017 #include <boost/hana/type.hpp>
0018 #include <boost/hana/unpack.hpp>
0019
0020 namespace hana = boost::hana;
0021
0022 namespace Acts {
0023
0024
0025
0026
0027
0028
0029 template <typename... actors_t>
0030 struct ActionList : public detail::Extendable<actors_t...> {
0031 private:
0032 static_assert(!detail::has_duplicates_v<actors_t...>,
0033 "same action type specified several times");
0034
0035 using detail::Extendable<actors_t...>::tuple;
0036
0037 public:
0038
0039
0040 template <template <typename...> class R>
0041 using result_type = typename decltype(hana::unpack(
0042 detail::type_collector_t<detail::result_type_extractor, actors_t...>,
0043 hana::template_<R>))::type;
0044
0045
0046 using detail::Extendable<actors_t...>::get;
0047
0048
0049 ActionList() = default;
0050
0051
0052
0053
0054 ActionList(const ActionList<actors_t...>& actors) = default;
0055
0056
0057
0058
0059 ActionList(ActionList<actors_t...>&& actors) = default;
0060
0061
0062
0063
0064 ActionList<actors_t...>& operator=(const ActionList<actors_t...>& actors) =
0065 default;
0066
0067
0068
0069
0070 ActionList<actors_t...>& operator=(ActionList<actors_t...>&& actors) =
0071 default;
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084 template <typename propagator_state_t, typename stepper_t,
0085 typename navigator_t, typename... Args>
0086 void operator()(propagator_state_t& state, const stepper_t& stepper,
0087 const navigator_t& navigator, Args&&... args) const {
0088 using impl = detail::action_list_impl<actors_t...>;
0089 impl::action(tuple(), state, stepper, navigator,
0090 std::forward<Args>(args)...);
0091 }
0092 };
0093
0094 }