YAMI4 C++ Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
outgoing_message_generic_dispatcher.h
1// Copyright Maciej Sobczak 2008-2022.
2// This file is part of YAMI4.
3// See the package-level LICENSE.txt file.
4
5#ifndef YAMICPP_OUTGOING_MESSAGE_GENERIC_DISPATCHER_H_INCLUDED
6#define YAMICPP_OUTGOING_MESSAGE_GENERIC_DISPATCHER_H_INCLUDED
7
8#include "outgoing_message_dispatcher_base.h"
9#include <yami4-core/dll.h>
10
11namespace yami
12{
13
14class outgoing_message;
15
16namespace details
17{
18
19template <typename functor>
22{
23public:
24 outgoing_message_generic_dispatcher(functor & f) : f_(f) {}
25
26 virtual void dispatch(outgoing_message & om)
27 {
28 f_(om);
29 }
30
31private:
32 functor & f_;
33};
34
35} // namespace details
36
37} // namespace yami
38
39#endif // YAMICPP_OUTGOING_MESSAGE_GENERIC_DISPATCHER_H_INCLUDED
Definition: outgoing_message_dispatcher_base.h:19
Definition: outgoing_message_generic_dispatcher.h:22
Outgoing message.
Definition: outgoing_message.h:33
Namespace devoted to everything related to YAMI4.
Definition: agent.h:21