106 #ifdef VLINK_SUPPORT_SHM
111 #include "../impl/conf.h"
143 explicit ShmConf(
const std::string& _address,
const std::string& _event =
"", int32_t _domain = 0, int32_t _depth = 0,
144 int32_t _history = 0, int32_t _wait = 0);
152 [[nodiscard]]
bool operator==(
const ShmConf& conf)
const noexcept;
160 [[nodiscard]]
bool operator!=(
const ShmConf& conf)
const noexcept;
167 [[nodiscard]]
TransportType get_transport_type()
const override;
178 [[nodiscard]]
static bool has_roudi_inited();
190 [[nodiscard]]
static bool has_runtime_inited();
205 [[nodiscard]]
static bool has_roudi_running();
225 [[nodiscard]]
static bool auto_init_roudi(
bool same_process_from_roudi =
false);
239 static void init_roudi(
const std::string& config_path =
"",
int memory_strategy = 0,
bool monitoring_enable =
true);
254 static void init_runtime(
const std::string& name =
"",
bool same_process_from_roudi =
false);
263 static void deinit_runtime();
265 #ifndef VLINK_ENABLE_C_INTERFACE
276 inline ShmConf::ShmConf(
const std::string& _address,
const std::string& _event, int32_t _domain, int32_t _depth,
277 int32_t _history, int32_t _wait)
278 : address(_address), event(_event), domain(_domain), depth(_depth), history(_history), wait(_wait) {}
281 return address == conf.address &&
event == conf.event && domain == conf.domain && depth == conf.depth &&
282 history == conf.history && wait == conf.wait;
285 inline bool ShmConf::operator!=(
const ShmConf& conf)
const noexcept {
return !(*
this == conf); }
287 inline TransportType ShmConf::get_transport_type()
const {
return TransportType::kShm; }
#define VLINK_CONF_IMPL(classname)
Convenience macro that emits the standard concrete conf boilerplate.
Definition: conf.h:251
#define VLINK_DECLARE_GLOBAL_PROPERTY()
Declares per-transport static configuration storage and access helpers.
Definition: conf.h:309
#define VLINK_ALLOW_IMPL_TYPE(type)
Records the bitmask of ImplType values supported by a conf.
Definition: conf.h:292
#define VLINK_EXPORT
Definition: macros.h:81
bool operator==(const Function< ReturnT(ArgsT...), SboSizeT > &cb, std::nullptr_t) noexcept
Equality with nullptr; true when cb has no stored target.
Definition: functional.h:1051
bool operator!=(const Function< ReturnT(ArgsT...), SboSizeT > &cb, std::nullptr_t) noexcept
Inequality with nullptr; true when cb stores a target.
Definition: functional.h:1061
TransportType
Enumeration of every transport backend recognised by VLink.
Definition: types.h:128
@ kGetter
Field getter (reads latest value).
Definition: types.h:117
@ kSubscriber
Event subscriber (receives broadcasts).
Definition: types.h:115
@ kClient
Method client (RPC caller).
Definition: types.h:113
@ kSetter
Field setter (writes latest value).
Definition: types.h:116
@ kPublisher
Event publisher (one-to-many broadcast).
Definition: types.h:114
@ kServer
Method server (RPC responder).
Definition: types.h:112