OSVR-Core
Public Member Functions | List of all members
OSVR_DeviceInitObject Struct Reference

Structure used internally to construct the desired type of device. More...

#include <DeviceInitObject.h>

Inheritance diagram for OSVR_DeviceInitObject:

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 >
TmakeInterfaceObject ()
 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::PluginSpecificRegistrationContextgetContext ()
 Retrieves the plugin context.
 
boost::optional< OSVR_ChannelCountgetAnalogs () const
 
boost::optional< OSVR_ChannelCountgetButtons () const
 
bool getTracker () const
 
osvr::connection::ServerInterfaceList const & getServerInterfaces () const
 
osvr::common::DeviceComponentList const & getComponents () const
 

Detailed Description

Structure used internally to construct the desired type of device.

Member Function Documentation

§ addComponent()

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.

§ addServerInterface()

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.

§ addTokenInterest()

void OSVR_DeviceInitObject::addTokenInterest ( OSVR_DeviceTokenObject **  devPtr)
inline

Add an observer that we'll eventually inform about the device token.

§ makeInterfaceObject()

template<typename T >
T* OSVR_DeviceInitObject::makeInterfaceObject ( )
inline

A helper method to make a "device interface object" of user-designated type and apppropriate lifetime.


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