Class responsible for hosting plugins, along with their registration and destruction. More...
#include <osvr/PluginHost/RegistrationContext.h>
Classes | |
struct | Impl |
Public Member Functions | |
RegistrationContext () | |
basic constructor | |
~RegistrationContext () | |
Destructor responsible for destroying plugins in reverse order. | |
Host-side (internal) API | |
Load a plugin from a dynamic library in this context | |
void | loadPlugin (std::string const &pluginName) |
void | loadPlugins () |
Load all detected plugins except those with a .manualload suffix. | |
void | adoptPluginRegistrationContext (PluginRegPtr ctx) |
Assume ownership of a plugin-specific registration context created and initialized outside of loadPlugin. More... | |
void | triggerHardwareDetect () |
Trigger any registered hardware detect callbacks. | |
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... | |
util::AnyMap & | data () |
Access the data storage map. | |
util::AnyMap const & | data () const |
Const access the data storage map. | |
Class responsible for hosting plugins, along with their registration and destruction.
Definition at line 53 of file RegistrationContext.h.
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.
Definition at line 210 of file RegistrationContext.cpp.
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. |
Definition at line 225 of file RegistrationContext.cpp.