1 #ifndef art_Framework_Services_Registry_LocalSignal_h 2 #define art_Framework_Services_Registry_LocalSignal_h 38 using slot_type = std::function<ResultType(Args...)>;
46 using size_type =
typename ContainerType_::size_type;
52 void watch(
ScheduleID const, std::function<ResultType(Args...)> slot);
55 void watch(
ScheduleID const, ResultType (T::*slot)(Args...), T& t);
59 ResultType (T::*slot)(Args...)
const,
63 void watchAll(std::function<ResultType(Args...)> slot);
66 void watchAll(ResultType (T::*slot)(Args...), T& t);
69 void watchAll(ResultType (T::*slot)(Args...)
const, T
const& t);
71 void invoke(
ScheduleID const, Args&&... args)
const;
81 : signals_(nSchedules)
91 std::function<ResultType(Args...)> slot)
93 detail::connect_to_signal<STYPE>(signals_.at(sID.
id()), slot);
100 template <
typename T>
103 ResultType (T::*slot)(Args...),
113 template <
typename T>
116 ResultType (T::*slot)(Args...)
129 std::function<ResultType(Args...)> slot)
131 for (
auto& signal : signals_) {
132 detail::connect_to_signal<STYPE>(signal, slot);
140 template <
typename T>
143 ResultType (T::*slot)(Args...),
153 template <
typename T>
156 ResultType (T::*slot)(Args...)
const,
167 Args&&... args)
const 169 for (
auto f : signals_.at(sID.
id())) {
170 f(std::forward<Args>(args)...);
std::vector< std::deque< slot_type >> ContainerType_
std::function< ResultType(Args...)> makeWatchFunc(ResultType(T::*slot)(Args...), T &t)
typename ContainerType_::size_type size_type
std::function< ResultType(Args...)> slot_type
constexpr id_type id() const noexcept