OSVR-Core
Namespaces | Classes | Functions
osvr::pluginkit Namespace Reference

Contains C++ header-only wrappers for the PluginKit C API. More...

Namespaces

 detail
 Internal implementation-only namespace.
 

Classes

class  DeviceToken
 Wrapper class for OSVR_DeviceToken. More...
 
class  ImagingInterface
 A class wrapping an imaging interface for a device. More...
 
class  ImagingMessage
 A class wrapping a cv::Mat representing a frame, as well as the sensor ID it corresponds to. More...
 
class  PluginContext
 C++ wrapper class for the opaque plugin context. More...
 

Functions

OSVR_MessageType registerMessageType (OSVR_IN_PTR OSVR_PluginRegContext ctx, OSVR_IN_STRZ const char *name)
 Register or recall a message type by name. More...
 
OSVR_MessageType registerMessageType (OSVR_IN_PTR OSVR_PluginRegContext ctx, OSVR_IN std::string const &name)
 
template<typename T >
TregisterObjectForDeletion (OSVR_PluginRegContext ctx, T *obj)
 Registers an object to be destroyed with delete when the plugin is unloaded. More...
 
template<typename T >
void registerHardwareDetectCallback (OSVR_PluginRegContext ctx, T functor)
 Registers a function object to be called when the core requests a hardware detection. More...
 
template<typename T >
void registerDriverInstantiationCallback (OSVR_PluginRegContext ctx, const char driverName[], T functor)
 Registers a function object to be called when the server is told to instantiate a driver by name with parameters. More...
 
void log (OSVR_PluginRegContext ctx, OSVR_LogLevel severity, const char *message)
 

Detailed Description

Contains C++ header-only wrappers for the PluginKit C API.

Use of these wrappers is optional: they duplicate functionality found in the C API as they are implemented in headers on top of the C API. However, they also provide a much cleaner, low-boilerplate interface for the most common operations.

The free functions and the members of osvr::pluginkit::PluginContext perform the same functionality. Use of the class can just lead to cleaner code if your whole plugin is "C++-style".