10 #ifndef CORE_PROTOCOL_BASE_DISPATCHER_HPP
11 #define CORE_PROTOCOL_BASE_DISPATCHER_HPP
20 template <
typename... Args>
25 using CbType = std::function<void(Args...)>;
37 CbId(
typename std::list<CbType>::iterator i)
39 : iter(i), valid(true)
43 typename std::list<CbType>::iterator iter;
53 return CbId(--cbs.end());
77 std::list<CbType> cbs;
Definition: dispatcher.hpp:28
CbId()
Definition: dispatcher.hpp:31
Definition: dispatcher.hpp:22
void delCB(CbId &id)
Definition: dispatcher.hpp:60
CbId addCB(CbType cb)
Definition: dispatcher.hpp:48
void broadcast(Args... args)
Definition: dispatcher.hpp:68
std::function< void(Args...)> CbType
Definition: dispatcher.hpp:25
Definition: commFactory.cpp:15