|
OSVR-Core
|
Public Member Functions | |
| VRPNDeviceRegistration (VRPNDeviceRegistration const &)=delete | |
| noncopyable | |
| VRPNDeviceRegistration & | operator= (VRPNDeviceRegistration const &)=delete |
| nonassignable | |
| OSVR_VRPNSERVER_EXPORT | VRPNDeviceRegistration (OSVR_PluginRegContext ctx) |
| Start the process of registering a manually-created VRPN device into the OSVR server core. More... | |
| OSVR_VRPNSERVER_EXPORT | VRPNDeviceRegistration (pluginhost::PluginSpecificRegistrationContext &context) |
| OSVR_VRPNSERVER_EXPORT | ~VRPNDeviceRegistration () |
| destructor More... | |
| OSVR_VRPNSERVER_EXPORT 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... | |
| OSVR_VRPNSERVER_EXPORT vrpn_Connection * | getVRPNConnection () |
| Get the vrpn_Connection object to use in constructing your object. More... | |
| 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. More... | |
| OSVR_VRPNSERVER_EXPORT void | setDeviceDescriptor (std::string const &jsonString) |
| osvr::vrpnserver::VRPNDeviceRegistration::VRPNDeviceRegistration | ( | OSVR_PluginRegContext | ctx | ) |
Start the process of registering a manually-created VRPN device into the OSVR server core.
| 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.
| osvr::vrpnserver::VRPNDeviceRegistration::~VRPNDeviceRegistration | ( | ) |
destructor
Must be in .cpp file to handle pimpl deletion here.
|
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. |
| vrpn_Connection * osvr::vrpnserver::VRPNDeviceRegistration::getVRPNConnection | ( | ) |
Get the vrpn_Connection object to use in constructing your object.
Registers your custom device with the server and takes ownership of the object.
| 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.
1.8.12