7#ifndef CORE_PROTOCOL_BASE_DISPATCHER_HPP
8#define CORE_PROTOCOL_BASE_DISPATCHER_HPP
15 template <
typename... Args>
19 using CbType = std::function<void(Args...)>;
30 CbId(
typename std::list<CbType>::iterator i)
32 : iter(i), valid(true)
36 typename std::list<CbType>::iterator iter;
45 return CbId(--cbs.end());
67 std::list<CbType> cbs;
Definition dispatcher.hpp:21
CbId()
Definition dispatcher.hpp:24
Definition dispatcher.hpp:16
std::function< void(Args...)> CbType
Definition dispatcher.hpp:19
CbId addCB(CbType cb)
Definition dispatcher.hpp:41
void broadcast(Args... args)
Definition dispatcher.hpp:59
void delCB(CbId &id)
Definition dispatcher.hpp:52
Definition commFactory.cpp:13