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));
51 T*
Get(std::string_view key)
const
53 return static_cast<T*
>(Find(KeyedName(T::InterfaceName, key)));
57 Subscription PublishNamed(std::string_view iface,
void* impl);
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;
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 Status Find(Iface *&target, InterfaceFactory factory, const char *version)