C++ wrapper class for the opaque plugin context. More...
#include <osvr/PluginKit/PluginKit.h>
Public Member Functions | |
PluginContext (OSVR_PluginRegContext ctx) | |
Constructor of the context wrapper object. | |
template<typename T > | |
void | registerHardwareDetectCallback (T functor) |
Register a hardware detect callback. More... | |
template<typename T > | |
void | registerDriverInstantiationCallback (const char driverName[], T functor) |
Register a driver instantiation callback. More... | |
template<typename T > | |
T * | registerObjectForDeletion (T *obj) |
Register the given object (assumed to be deletable by delete ) to be deleted on plugin unload. (Transfers lifetime control to the plugin context) More... | |
void | log (OSVR_LogLevel severity, const char *message) |
Log a message to the plugin-specific channel. More... | |
C++ wrapper class for the opaque plugin context.
This class provides no additional functionality beyond the free functions available in this namespace, it just provides syntactic sugar.
Definition at line 59 of file PluginKit.h.
|
inline |
Register a hardware detect callback.
Your callback should take one parameter of type OSVR_PluginRegContext and return a value of type ::OSVR_ReturnCode
Definition at line 70 of file PluginKit.h.
|
inline |
Register a driver instantiation callback.
Your callback should take a parameter of type OSVR_PluginRegContext and a parameter of type const char * (the JSON parameters as a string) and return a value of type ::OSVR_ReturnCode
Definition at line 83 of file PluginKit.h.
|
inline |
Register the given object (assumed to be deletable by delete
) to be deleted on plugin unload. (Transfers lifetime control to the plugin context)
Definition at line 93 of file PluginKit.h.
|
inline |
Log a message to the plugin-specific channel.
severity | The severity of the log message. |
message | The message to be logged. |
Definition at line 101 of file PluginKit.h.