Public Member Functions | |
VRPNDeviceRegistration (VRPNDeviceRegistration const &)=delete | |
noncopyable | |
VRPNDeviceRegistration & | operator= (VRPNDeviceRegistration const &)=delete |
nonassignable | |
VRPNDeviceRegistration (OSVR_PluginRegContext ctx) | |
Start the process of registering a manually-created VRPN device into the OSVR server core. | |
VRPNDeviceRegistration (pluginhost::PluginSpecificRegistrationContext &context) | |
~VRPNDeviceRegistration () | |
destructor More... | |
std::string | useDecoratedName (std::string const &name) |
Decorates a device name with the plugin name and returns it, as well as records it for registration with the connection. More... | |
vrpn_Connection * | getVRPNConnection () |
Get the vrpn_Connection object to use in constructing your object. | |
template<typename T > | |
T * | registerDevice (T *dev) |
Registers your custom device with the server and takes ownership of the object. More... | |
template<typename T > | |
T * | constructAndRegisterDevice (std::string const &name) |
Constructs and registers your custom device with the server and takes ownership of the object. Requires that your device only need a name and a vrpn_Connection to construct. More... | |
void | setDeviceDescriptor (std::string const &jsonString) |
Definition at line 59 of file VRPNDeviceRegistration.h.
osvr::vrpnserver::VRPNDeviceRegistration::VRPNDeviceRegistration | ( | pluginhost::PluginSpecificRegistrationContext & | context | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 93 of file VRPNDeviceRegistration.cpp.
osvr::vrpnserver::VRPNDeviceRegistration::~VRPNDeviceRegistration | ( | ) |
destructor
Must be in .cpp file to handle pimpl deletion here.
Definition at line 98 of file VRPNDeviceRegistration.cpp.
std::string osvr::vrpnserver::VRPNDeviceRegistration::useDecoratedName | ( | std::string const & | name | ) |
Decorates a device name with the plugin name and returns it, as well as records it for registration with the connection.
You must make at least one call to this, to get a proper name for your device.
If you make more calls, then the first call should be for the "primary" device. Note that order of evaluation of arguments (for instance, to a constructor call) is undefined, so you'll want to call this first and store its result in a temporary string before your constructor call if you need more than one name.
Definition at line 101 of file VRPNDeviceRegistration.cpp.
|
inline |
Registers your custom device with the server and takes ownership of the object.
Definition at line 99 of file VRPNDeviceRegistration.h.
|
inline |
Constructs and registers your custom device with the server and takes ownership of the object. Requires that your device only need a name and a vrpn_Connection to construct.
This is a shortcut method that handles calling useDecoratedName() and registerDevice() for you for the trivial case.
name | Un-decorated name for your device - the function will take care of decorating it for you. |
Definition at line 119 of file VRPNDeviceRegistration.h.