31 return PublishNamed(T::InterfaceName,
static_cast<void*
>(
impl));
38 return PublishNamed(KeyedName(T::InterfaceName,
key),
static_cast<void*
>(
impl));
46 return static_cast<T*
>(Find(T::InterfaceName));
53 return static_cast<T*
>(Find(KeyedName(T::InterfaceName,
key)));
58 void* Find(std::string_view
iface)
const;
60 static std::string KeyedName(std::string_view
iface, std::string_view
key)
62 return std::string(
iface) +
":" + std::string(
key);
65 IPluginServices& _services;
Typed view of the host's table of interfaces plugins publish to each other.
ServiceExchange(IPluginServices &services)
Subscription Publish(T *impl, std::string_view key)
Subscription Publish(T *impl)
T * Get(std::string_view key) const
Owns one registration and releases it on destruction.
static std::string ReadFile(const std::filesystem::path &path)