MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / VRPNButtonHandler

Method VRPNButtonHandler

src/osvr/Client/ButtonRemoteFactory.cpp:54–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 public:
53 typedef util::ValueOrRange<int> RangeType;
54 VRPNButtonHandler(vrpn_ConnectionPtr const &conn, const char *src,
55 boost::optional<int> sensor,
56 common::InterfaceList &ifaces)
57 : m_remote(new vrpn_Button_Remote(src, conn.get())),
58 m_interfaces(ifaces), m_all(!sensor.is_initialized()) {
59 m_remote->register_change_handler(this, &VRPNButtonHandler::handle);
60 m_remote->register_states_handler(
61 this, &VRPNButtonHandler::handle_states);
62 OSVR_DEV_VERBOSE("Constructed a ButtonHandler for " << src);
63
64 if (sensor.is_initialized()) {
65 m_sensors.setValue(*sensor);
66 }
67 }
68 virtual ~VRPNButtonHandler() {
69 m_remote->unregister_change_handler(this,
70 &VRPNButtonHandler::handle);

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected