OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::pluginhost::RegistrationContext Class Reference

Class responsible for hosting plugins, along with their registration and destruction. More...

#include <osvr/PluginHost/RegistrationContext.h>

Inheritance diagram for osvr::pluginhost::RegistrationContext:

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 &params=std::string()) const
 Call a driver instantiation callback for the given plugin name and driver name. More...
 
util::AnyMapdata ()
 Access the data storage map.
 
util::AnyMap const & data () const
 Const access the data storage map.
 

Detailed Description

Class responsible for hosting plugins, along with their registration and destruction.

Definition at line 53 of file RegistrationContext.h.

Member Function Documentation

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.

Exceptions
std::runtime_errorif 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.


The documentation for this class was generated from the following files: