OSVR-Core
|
Class responsible for hosting plugins, along with their registration and destruction. More...
#include <RegistrationContext.h>
Classes | |
struct | Impl |
Public Member Functions | |
OSVR_PLUGINHOST_EXPORT | RegistrationContext () |
basic constructor | |
OSVR_PLUGINHOST_EXPORT | ~RegistrationContext () |
Destructor responsible for destroying plugins in reverse order. More... | |
Host-side (internal) API | |
Load a plugin from a dynamic library in this context | |
OSVR_PLUGINHOST_EXPORT void | loadPlugin (std::string const &pluginName) |
OSVR_PLUGINHOST_EXPORT void | loadPlugins () |
Load all detected plugins except those with a .manualload suffix. | |
OSVR_PLUGINHOST_EXPORT void | adoptPluginRegistrationContext (PluginRegPtr ctx) |
Assume ownership of a plugin-specific registration context created and initialized outside of loadPlugin. More... | |
OSVR_PLUGINHOST_EXPORT void | triggerHardwareDetect () |
Trigger any registered hardware detect callbacks. | |
OSVR_PLUGINHOST_EXPORT void | instantiateDriver (const std::string &pluginName, const std::string &driverName, const std::string ¶ms=std::string()) const |
Call a driver instantiation callback for the given plugin name and driver name. More... | |
OSVR_PLUGINHOST_EXPORT util::AnyMap & | data () |
Access the data storage map. | |
OSVR_PLUGINHOST_EXPORT util::AnyMap const & | data () const |
Const access the data storage map. | |
Class responsible for hosting plugins, along with their registration and destruction.
osvr::pluginhost::RegistrationContext::~RegistrationContext | ( | ) |
Destructor responsible for destroying plugins in reverse order.
void osvr::pluginhost::RegistrationContext::adoptPluginRegistrationContext | ( | PluginRegPtr | ctx | ) |
Assume ownership of a plugin-specific registration context created and initialized outside of loadPlugin.
This set parent might be a duplicate, but won't be if the plugin reg ctx is not created by loadPlugin above.
void osvr::pluginhost::RegistrationContext::instantiateDriver | ( | const std::string & | pluginName, |
const std::string & | driverName, | ||
const std::string & | params = std::string() |
||
) | const |
Call a driver instantiation callback for the given plugin name and driver name.
std::runtime_error | if the plugin named hasn't been loaded, if there is no driver registered by that name in the given plugin, or if the constructor returns failure. |