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

node_kind.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_MESSAGE_BUS_NODE_KIND_HPP
10 #define EAGINE_MESSAGE_BUS_NODE_KIND_HPP
11 
12 #include "../reflect/map_enumerators.hpp"
13 
14 namespace eagine::msgbus {
15 //------------------------------------------------------------------------------
18 enum class node_kind : std::uint8_t {
20  unknown,
22  endpoint,
24  bridge,
26  router
27 };
28 //------------------------------------------------------------------------------
29 template <typename Selector>
30 constexpr auto enumerator_mapping(type_identity<node_kind>, Selector) noexcept {
31  return enumerator_map_type<node_kind, 4>{
32  {{"unknown", node_kind::unknown},
33  {"endpoint", node_kind::endpoint},
34  {"bridge", node_kind::bridge},
35  {"router", node_kind::router}}};
36 }
37 //------------------------------------------------------------------------------
38 } // namespace eagine::msgbus
39 
40 #endif // EAGINE_MESSAGE_BUS_NODE_KIND_HPP
@ unknown
Unknown node kind.
@ endpoint
Message bus client endpoint.
Message bus code is placed in this namespace.
Definition: eagine.hpp:58
node_kind
Message bus node kind enumeration.
Definition: node_kind.hpp:18
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
@ bridge
Message bus bridge.
@ router
Message bus router.

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