OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::msgbus::message_view Struct Reference

Combines message information and a non-owning view to message content. More...

#include <eagine/message_bus/message.hpp>

Public Member Functions

constexpr message_view () noexcept=default
 Default constructor.
 
constexpr message_view (memory::const_block init) noexcept
 Construction from a const memory block.
 
constexpr message_view (memory::block init) noexcept
 Construction from a mutable memory block.
 
constexpr message_view (string_view init) noexcept
 Construction from a string view.
 
constexpr message_view (message_info info, memory::const_block init) noexcept
 Construction from a message info and a const memory block.
 
- Public Member Functions inherited from eagine::msgbus::message_info
auto too_many_hops () const noexcept -> bool
 Indicates that the message made too many hops. More...
 
auto add_hop () noexcept -> auto &
 Increments the hop counter. More...
 
auto too_old () const noexcept -> bool
 Indicates that the message is too old. More...
 
auto add_age (message_age age) noexcept -> auto &
 Adds to the age seconds counter. More...
 
auto age () const noexcept -> message_age
 Returns the message age. More...
 
auto set_priority (message_priority new_priority) noexcept -> auto &
 Sets the priority of this message.
 
auto set_source_id (identifier_t id) noexcept -> auto &
 Sets the source endpoint identifier.
 
auto set_target_id (identifier_t id) noexcept -> auto &
 Sets the target endpoint identifier.
 
auto has_serializer_id (identifier id) const noexcept -> bool
 Tests if a data serializer with the specified id was used. More...
 
auto set_serializer_id (identifier id) noexcept -> auto &
 Sets the id of the used data content serializer. More...
 
auto set_sequence_no (message_sequence_t no) noexcept -> auto &
 Sets the sequence number of this message (has message-type specific meaning). More...
 
auto setup_response (const message_info &info) noexcept -> auto &
 Sets the target id to be the source id from info, copies sequence number. More...
 

Public Attributes

memory::const_block data
 View of the message data content.
 
- Public Attributes inherited from eagine::msgbus::message_info
identifier_t source_id
 Returns the source endpoint identifier. More...
 
identifier_t target_id
 Returns the target endpoint identifier. More...
 
identifier_t serializer_id
 Returns the identifier of the used serializer. More...
 
sequence_t sequence_no
 The message sequence number. More...
 
hop_count_t hop_count
 The message hop counter. More...
 
age_t age_quarter_seconds
 The message age in quarter seconds. More...
 
message_priority priority
 The message priority. More...
 
message_crypto_flags crypto_flags
 The message cryptography flags.
 

Additional Inherited Members

- Public Types inherited from eagine::msgbus::message_info
using sequence_t = message_sequence_t
 Alias for the sequence number type. More...
 
using hop_count_t = std::int8_t
 Alias for type used to store the message hop count.
 
using age_t = std::int8_t
 Alias for type used to store the message age in quarter seconds.
 

Detailed Description

Combines message information and a non-owning view to message content.


The documentation for this struct was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).