OSVR-Core
|
C++ wrapper class for the opaque plugin context. More...
#include <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. 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.
|
inline |
Log a message to the plugin-specific channel.
severity | The severity of the log message. |
message | The message to be logged. |
|
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
|
inline |
Register a hardware detect callback.
Your callback should take one parameter of type OSVR_PluginRegContext and return a value of type ::OSVR_ReturnCode
|
inline |
Register the given object (assumed to be deletable by delete
) to be deleted on plugin unload.
(Transfers lifetime control to the plugin context)