Go to the documentation of this file.
9 #ifndef EAGINE_MESSAGE_BUS_HANDLER_MAP_HPP
10 #define EAGINE_MESSAGE_BUS_HANDLER_MAP_HPP
12 #include "../mem_func_const.hpp"
13 #include "../message_id.hpp"
14 #include "../span.hpp"
25 template <
typename MemFuncConst>
31 : _msg_id{std::move(msgid)} {}
39 static constexpr
auto method() noexcept -> MemFuncConst {
51 template <
typename MessageId,
typename MemFuncConst>
55 static constexpr
auto msg_id() noexcept -> MessageId {
60 static constexpr
auto method() noexcept -> MemFuncConst {
72 #define EAGINE_MSG_MAP(CLASS_ID, METHOD_ID, CLASS, METHOD) \
73 eagine::msgbus::static_message_handler_map< \
74 EAGINE_MSG_TYPE(CLASS_ID, METHOD_ID), \
75 EAGINE_MEM_FUNC_T(CLASS, METHOD)>()
79 #endif // EAGINE_MESSAGE_BUS_HANDLER_MAP_HPP
static constexpr auto method() noexcept -> MemFuncConst
Returns the member function constant.
Definition: handler_map.hpp:60
static constexpr auto msg_id() noexcept -> MessageId
Returns the message type id.
Definition: handler_map.hpp:55
constexpr auto msg_id() const noexcept -> message_id
Returns the message type id.
Definition: handler_map.hpp:34
static constexpr auto method() noexcept -> MemFuncConst
Returns the member function constant.
Definition: handler_map.hpp:39
Represents a mapping from a message type id to member function constant.
Definition: handler_map.hpp:26
Message bus code is placed in this namespace.
Definition: eagine.hpp:58
constexpr message_handler_map(message_id msgid) noexcept
Construction from message type id.
Definition: handler_map.hpp:30
Class storing two identifier values representing class/method pair.
Definition: message_id.hpp:25
Represents a mapping from a message type id to member function constant.
Definition: handler_map.hpp:52