1 #include "hmbdc/Copyright.hpp" 4 #include "hmbdc/app/Message.hpp" 6 namespace hmbdc {
namespace app {
8 namespace messagehandler_detail {
11 template <
typename CcClient,
typename Message>
14 if (m.typeTag == Message::typeTag) {
15 p->handleMessageCb(m.get<Message>());
17 auto& wrap =
static_cast<Wrap&
>(m);
25 template <
typename CcClient>
28 if (m.typeTag > 1000) {
29 auto j = &m.get<uint8_t>();
30 p->handleJustBytesCb(m.typeTag, j);
38 template <
typename CcClient,
typename ... Messages>
40 static void tryDispatch(CcClient* p,
MessageHead& w){
46 template <
typename CcClient,
typename M,
typename ... Messages>
48 static void tryDispatch(CcClient* p,
MessageHead& e) {
50 NEH::tryDispatch(p, e);
53 tryDispatch(static_cast<CcClient*>(
this), w);
Definition: MessageHandler.hpp:12
Definition: Message.hpp:42
A special type of message.
Definition: Message.hpp:143
Definition: Message.hpp:76
Definition: MessageHandler.hpp:9
Definition: MessageHandler.hpp:39