Go to the documentation of this file.
9 #ifndef EAGINE_MESSAGE_BUS_LOOPBACK_HPP
10 #define EAGINE_MESSAGE_BUS_LOOPBACK_HPP
34 std::unique_lock lock{_mutex};
40 std::unique_lock lock{_mutex};
51 #endif // EAGINE_MESSAGE_BUS_LOOPBACK_HPP
Declaration of class template storing a reference to a callable object.
Definition: callable_ref.hpp:24
#define EAGINE_ID(NAME)
Macro for constructing instances of eagine::identifier.
Definition: identifier.hpp:353
auto fetch_all(fetch_handler handler) -> bool
Fetches all currently stored messages and calls handler on them.
Loopback implementation of connection. Used mainly for testing and development.
Definition: loopback.hpp:19
auto fetch_messages(connection::fetch_handler handler) -> bool final
Fetch all enqueued messages that have been received since last fetch.
Definition: loopback.hpp:39
Interface for message bus connections.
Definition: connection.hpp:114
@ in_process
In-process connection (cannot be used for inter-process communication).
auto kind() -> connection_kind final
Returns the connection kind.
Definition: loopback.hpp:21
Combines message information and a non-owning view to message content.
Definition: message.hpp:288
Message bus code is placed in this namespace.
Definition: eagine.hpp:58
auto addr_kind() -> connection_addr_kind final
Returns the connection address kind.
Definition: loopback.hpp:25
@ message
Message protocol.
connection_addr_kind
Message bus connection address kind enumeration.
Definition: connection.hpp:30
auto send(message_id msg_id, const message_view &message) -> bool final
Sent a message with the specified id.
Definition: loopback.hpp:33
connection_kind
Message bus connection kind bits enumeration.
Definition: connection_kind.hpp:21
Class storing message bus messages.
Definition: message.hpp:446
void push(message_id msg_id, const message_view &message)
Pushes a message into this storage.
Definition: message.hpp:464
Class storing two identifier values representing class/method pair.
Definition: message_id.hpp:25
auto type_id() -> identifier final
Returns a description identifier of the implementation.
Definition: loopback.hpp:29