YAMI4 C++ Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
value_publisher_overflow_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_VALUE_PUBLISHER_OVERFLOW_GENERIC_DISPATCHER_H_INCLUDED
6#define YAMICPP_VALUE_PUBLISHER_OVERFLOW_GENERIC_DISPATCHER_H_INCLUDED
7
8#include "value_publisher_overflow_dispatcher_base.h"
9#include <yami4-core/dll.h>
10
11namespace yami
12{
13
14namespace details
15{
16
17template <typename functor>
20{
21public:
23
24 virtual value_publisher_overflow_action dispatch(
25 const std::string & server_name,
26 const std::string & object_name,
27 const serializable & value)
28 {
29 return f_(server_name, object_name, value);
30 }
31
32private:
33 functor & f_;
34};
35
36} // namespace details
37
38} // namespace yami
39
40#endif // YAMICPP_VALUE_PUBLISHER_OVERFLOW_GENERIC_DISPATCHER_H_INCLUDED
Definition: value_publisher_overflow_dispatcher_base.h:21
Definition: value_publisher_overflow_generic_dispatcher.h:20
Common interface for serializable data source.
Definition: serializable.h:21
Namespace devoted to everything related to YAMI4.
Definition: agent.h:21
value_publisher_overflow_action
User-defined reaction to the overflow condition in value publisher.
Definition: value_publisher_overflow_action.h:13