This is the actual interface to a particular VRPN button device, and all of its numbered buttons. More...
#include "vrpnButton.h"
Public Member Functions | |
VrpnButton (const std::string &button_name, vrpn_Connection *connection) | |
const std::string & | get_button_name () const |
Returns the name of the button device that was used to create this VrpnButton. More... | |
bool | is_empty () const |
Returns true if no VrpnButtonDevices reference this VrpnButton, or false otherwise. More... | |
void | mark (VrpnButtonDevice *device) |
Adds the indicated VrpnButtonDevice to the list of devices that are sharing this VrpnButton. More... | |
void | output (std::ostream &out) const |
void | poll () |
Polls the connected device. More... | |
void | unmark (VrpnButtonDevice *device) |
Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton. More... | |
void | write (std::ostream &out, int indent_level=0) const |
This is the actual interface to a particular VRPN button device, and all of its numbered buttons.
A pointer to this object is stored in the VrpnClient class for each differently-named VRPN button device we connect to.
The VRPN callbacks go here, which in turn get vectored out to any VrpnButtonDevice objects that register with this. When the last VrpnButtonDevice object unregisters, the VrpnButton will be deleted by the VrpnClient.
This class does not need to be exported from the DLL.
Definition at line 37 of file vrpnButton.h.
|
inline |
Returns the name of the button device that was used to create this VrpnButton.
Definition at line 19 of file vrpnButton.I.
|
inline |
Returns true if no VrpnButtonDevices reference this VrpnButton, or false otherwise.
Definition at line 28 of file vrpnButton.I.
void VrpnButton::mark | ( | VrpnButtonDevice * | device | ) |
Adds the indicated VrpnButtonDevice to the list of devices that are sharing this VrpnButton.
Definition at line 48 of file vrpnButton.cxx.
|
inline |
Polls the connected device.
Normally you should not call this directly; this will be called by the VrpnClient.
Definition at line 37 of file vrpnButton.I.
void VrpnButton::unmark | ( | VrpnButtonDevice * | device | ) |
Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton.
Definition at line 60 of file vrpnButton.cxx.