1#ifndef HOOK_HPP_RNAM6XF4
2#define HOOK_HPP_RNAM6XF4
11
12
13template<
typename... Args>
17 typedef std::function<
void(Args...)> callback_type;
20
21
22
25 m_function = std::move(cb);
28 void operator=(
const callback_type& cb)
34
35
36
41 m_function(std::forward<Args>(args)...);
46
47
48
55
56
60 callback_type m_function;
64
65
66
67
68
69template<
typename... Args>
73 using hook_type =
Hook<Args...>;
74 using callback_type =
typename hook_type::callback_type;
76 HookRegistry(hook_type& hook) : m_hook(hook) {}
78 void operator=(callback_type&& cb)
80 m_hook = std::move(cb);
83 void operator=(
const callback_type& cb)
void operator=(callback_type &&cb)
void operator()(Args... args)
virtual void tap_packet(const DataIndication &, const UpPacket &)=0
void add_promiscuous_hook(PromiscuousHook *hook)
void remove_promiscuous_hook(PromiscuousHook *)
void set_interactive_handler(port_type, IndicationInterface *)
Hook< const geonet::DataIndication &, const btp::DataIndication * > hook_undispatched
void set_non_interactive_handler(port_type, IndicationInterface *)