1 #ifndef art_Framework_Services_Registry_GlobalSignal_h 2 #define art_Framework_Services_Registry_GlobalSignal_h 34 using slot_type = std::function<ResultType(Args...)>;
36 template <std::
size_t I>
40 void watch(std::function<ResultType(Args...)> slot);
43 void watch(ResultType (T::*slot)(Args...), T& t);
46 void watch(T* t, ResultType (T::*slot)(Args...));
49 void watch(ResultType (T::*slot)(Args...)
const, T
const& t);
52 void watch(T
const* t, ResultType (T::*slot)(Args...)
const);
54 void invoke(Args
const&... args)
const;
66 std::function<ResultType(Args...)> slot)
68 detail::connect_to_signal<SRTYPE>(signal_, slot);
78 ResultType (T::*slot)(Args...),
92 ResultType (T::*slot)(Args...))
101 template <
typename T>
104 ResultType (T::*slot)(Args...)
const,
114 template <
typename T>
118 ResultType (T::*slot)(Args...)
const)
127 GlobalSignal<SRTYPE, ResultType(Args...)>::invoke(Args
const&... args)
const 129 for (
auto f : signal_) {
std::function< ResultType(Args...)> makeWatchFunc(ResultType(T::*slot)(Args...), T &t)
std::function< ResultType(Args...)> slot_type
std::deque< slot_type > signal_
std::tuple< Args... > tuple_type
std::tuple_element_t< I, tuple_type > slot_argument_type