1 #ifndef art_Framework_Services_Registry_GlobalSignal_h 2 #define art_Framework_Services_Registry_GlobalSignal_h 35 using slot_type = std::function<ResultType(Args...)>;
39 void watch(std::function<ResultType(Args...)> slot);
42 void watch(ResultType (T::*slot)(Args...), T& t);
45 void watch(T* t, ResultType (T::*slot)(Args...));
48 void watch(ResultType (T::*slot)(Args...)
const, T
const& t);
51 void watch(T
const* t, ResultType (T::*slot)(Args...)
const);
53 void invoke(Args&&... args)
const;
67 std::function<ResultType(Args...)> slot)
69 detail::connect_to_signal<SRTYPE>(signal_, slot);
79 ResultType (T::*slot)(Args...),
93 ResultType (T::*slot)(Args...))
102 template <
typename T>
105 ResultType (T::*slot)(Args...)
const,
115 template <
typename T>
119 ResultType (T::*slot)(Args...)
const)
128 GlobalSignal<SRTYPE, ResultType(Args...)>::invoke(Args&&... args)
const 130 for (
auto f : signal_) {
131 f(std::forward<Args>(args)...);
std::function< ResultType(Args...)> makeWatchFunc(ResultType(T::*slot)(Args...), T &t)
std::function< ResultType(Args...)> slot_type
std::deque< slot_type > signal_