8#ifndef CORE_PROTOCOL_BASE_DISPATCHER_HPP
9#define CORE_PROTOCOL_BASE_DISPATCHER_HPP
16 template <
typename... Args>
20 using CbType = std::function<void(Args...)>;
31 CbId(
typename std::list<CbType>::iterator i)
33 : iter(i), valid(true)
37 typename std::list<CbType>::iterator iter;
46 return CbId(--cbs.end());
68 std::list<CbType> cbs;
Definition dispatcher.hpp:22
CbId()
Definition dispatcher.hpp:25
Definition dispatcher.hpp:17
std::function< void(Args...)> CbType
Definition dispatcher.hpp:20
CbId addCB(CbType cb)
Definition dispatcher.hpp:42
void broadcast(Args... args)
Definition dispatcher.hpp:60
void delCB(CbId &id)
Definition dispatcher.hpp:53
Definition commFactory.cpp:13