OSVR-Core
|
Structure used internally to construct the desired type of device. More...
#include <DeviceInitObject.h>
Public Member Functions | |
OSVR_CONNECTION_EXPORT | OSVR_DeviceInitObject (OSVR_PluginRegContext ctx) |
OSVR_CONNECTION_EXPORT | OSVR_DeviceInitObject (osvr::connection::ConnectionPtr conn) |
OSVR_CONNECTION_EXPORT void | setName (std::string const &n) |
Set the (unqualified) name of the device to create. | |
OSVR_CONNECTION_EXPORT void | setAnalogs (OSVR_ChannelCount num, osvr::connection::AnalogServerInterface **iface) |
Set analogs: clears the boost::optional if 0 is passed. | |
void | returnAnalogInterface (osvr::connection::AnalogServerInterface &iface) |
Returns an analog interface through the pointer-pointer. | |
OSVR_CONNECTION_EXPORT void | setButtons (OSVR_ChannelCount num, osvr::connection::ButtonServerInterface **iface) |
Set buttons: clears the boost::optional if 0 is passed. | |
void | returnButtonInterface (osvr::connection::ButtonServerInterface &iface) |
Returns a button interface through the pointer-pointer. | |
OSVR_CONNECTION_EXPORT void | setTracker (osvr::connection::TrackerServerInterface **iface) |
Enables tracker interface. | |
OSVR_CONNECTION_EXPORT void | addServerInterface (osvr::connection::ServerInterfacePtr const &iface) |
Add a server interface pointer to our list, which will get registered when the device is created. More... | |
OSVR_CONNECTION_EXPORT void | addComponent (osvr::common::DeviceComponentPtr const &comp) |
Add a device component to our list, which will get added to the device when created. More... | |
template<typename T > | |
T * | makeInterfaceObject () |
A helper method to make a "device interface object" of user-designated type and apppropriate lifetime. More... | |
void | addTokenInterest (OSVR_DeviceTokenObject **devPtr) |
Add an observer that we'll eventually inform about the device token. More... | |
void | addTokenInterest (osvr::connection::DeviceInterfaceBase *ifaceObj) |
void | notifyToken (OSVR_DeviceTokenObject *dev) |
Notify all those interested what the device token is. | |
void | returnTrackerInterface (osvr::connection::TrackerServerInterface &iface) |
Returns a tracker interface through the pointer-pointer. | |
std::string | getQualifiedName () const |
Get device name qualified by plugin name. | |
osvr::connection::ConnectionPtr | getConnection () |
Retrieve the connection pointer. | |
OSVR_CONNECTION_EXPORT osvr::pluginhost::PluginSpecificRegistrationContext * | getContext () |
Retrieves the plugin context. | |
boost::optional< OSVR_ChannelCount > | getAnalogs () const |
boost::optional< OSVR_ChannelCount > | getButtons () const |
bool | getTracker () const |
osvr::connection::ServerInterfaceList const & | getServerInterfaces () const |
osvr::common::DeviceComponentList const & | getComponents () const |
Structure used internally to construct the desired type of device.
void OSVR_DeviceInitObject::addComponent | ( | osvr::common::DeviceComponentPtr const & | comp | ) |
Add a device component to our list, which will get added to the device when created.
void OSVR_DeviceInitObject::addServerInterface | ( | osvr::connection::ServerInterfacePtr const & | iface | ) |
Add a server interface pointer to our list, which will get registered when the device is created.
|
inline |
Add an observer that we'll eventually inform about the device token.
|
inline |
A helper method to make a "device interface object" of user-designated type and apppropriate lifetime.