70#ifdef VLINK_SUPPORT_SHM2
95 uint64_t size{kDefaultMemSize};
108 explicit Shm2Conf(
const std::string& _address,
const std::string& _event =
"", int32_t _domain = 0,
109 int32_t _depth = 0, int32_t _history = 0, int32_t _wait = 0, uint64_t _size = kDefaultMemSize);
117 [[nodiscard]]
bool operator==(
const Shm2Conf& conf)
const noexcept;
125 [[nodiscard]]
bool operator!=(
const Shm2Conf& conf)
const noexcept;
132 [[nodiscard]]
TransportType get_transport_type()
const override;
134 static constexpr size_t kDefaultMemSize = 128U;
135 static constexpr size_t kMaxMemSize = 1024UL * 1024UL * 32;
137#ifndef VLINK_ENABLE_C_INTERFACE
148inline Shm2Conf::Shm2Conf(
const std::string& _address,
const std::string& _event, int32_t _domain, int32_t _depth,
149 int32_t _history, int32_t _wait, uint64_t _size)
150 : address(_address), event(_event), domain(_domain), depth(_depth), history(_history), wait(_wait), size(_size) {}
152inline bool Shm2Conf::operator==(
const Shm2Conf& conf)
const noexcept {
153 return address == conf.address &&
event == conf.event && domain == conf.domain && depth == conf.depth &&
154 history == conf.history && wait == conf.wait && size == conf.size;
157inline bool Shm2Conf::operator!=(
const Shm2Conf& conf)
const noexcept {
return !(*
this == conf); }
159inline TransportType Shm2Conf::get_transport_type()
const {
return TransportType::kShm2; }
Abstract transport configuration base class and associated helper macros.
#define VLINK_CONF_IMPL(classname)
Standard boilerplate for concrete Conf subclass declarations.
Definition conf.h:227
#define VLINK_DECLARE_GLOBAL_PROPERTY()
Declares per-transport global state: thread count and property storage.
Definition conf.h:292
#define VLINK_ALLOW_IMPL_TYPE(type)
Declares a static constexpr bitmask of supported ImplType values.
Definition conf.h:268
#define VLINK_EXPORT
Definition macros.h:85
TransportType
Enumeration of all supported transport backends.
Definition types.h:107
Abstract base class for VLink transport configuration objects.
Definition conf.h:83