YAMI4 C++ Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
connection_event_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_CONNECTION_EVENT_GENERIC_DISPATCHER_H_INCLUDED
6#define YAMICPP_CONNECTION_EVENT_GENERIC_DISPATCHER_H_INCLUDED
7
8#include "connection_event_dispatcher_base.h"
9#include <yami4-core/dll.h>
10
11namespace yami
12{
13
14namespace details
15{
16
17template <typename functor>
20{
21public:
22 connection_event_generic_dispatcher(functor & f) : f_(f) {}
23
24 virtual void dispatch(const std::string & name, connection_event event)
25 {
26 f_(name, event);
27 }
28
29private:
30 functor & f_;
31};
32
33} // namespace details
34
35} // namespace yami
36
37#endif // YAMICPP_CONNECTION_EVENT_GENERIC_DISPATCHER_H_INCLUDED
Definition: connection_event_dispatcher_base.h:20
Definition: connection_event_generic_dispatcher.h:20
Namespace devoted to everything related to YAMI4.
Definition: agent.h:21
connection_event
Kind of connection event.
Definition: connection_event.h:13