#include <vrpnButton.h>
Public Member Functions | |
VrpnButton (const string &button_name, vrpn_Connection *connection) | |
~VrpnButton () | |
const string & | get_button_name () const |
Returns the name of the button device that was used to create this VrpnButton. | |
bool | is_empty () const |
Returns true if no VrpnButtonDevices reference this VrpnButton, or false otherwise. | |
void | mark (VrpnButtonDevice *device) |
Adds the indicated VrpnButtonDevice to the list of devices that are sharing this VrpnButton. | |
void | unmark (VrpnButtonDevice *device) |
Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton. | |
void | poll () |
Polls the connected device. | |
void | output (ostream &out) const |
void | write (ostream &out, int indent_level=0) const |
Private Types | |
typedef pvector< VrpnButtonDevice * > | Devices |
Static Private Member Functions | |
void | vrpn_button_callback (void *userdata, const vrpn_BUTTONCB info) |
Receives the button event data from the VRPN code and sends it to any interested VrpnButtonDevices. | |
Private Attributes | |
string | _button_name |
vrpn_Button_Remote * | _button |
Devices | _devices |
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 64 of file vrpnButton.h.
|
Definition at line 88 of file vrpnButton.h. |
|
Definition at line 39 of file vrpnButton.cxx. |
|
Definition at line 55 of file vrpnButton.cxx. References _devices. |
|
Returns the name of the button device that was used to create this VrpnButton.
Definition at line 33 of file vrpnButton.I. |
|
Returns true if no VrpnButtonDevices reference this VrpnButton, or false otherwise.
Definition at line 48 of file vrpnButton.I. |
|
Adds the indicated VrpnButtonDevice to the list of devices that are sharing this VrpnButton.
Definition at line 70 of file vrpnButton.cxx. References _devices. |
|
Definition at line 109 of file vrpnButton.cxx. |
|
Polls the connected device. Normally you should not call this directly; this will be called by the VrpnClient. Definition at line 65 of file vrpnButton.I. Referenced by VrpnClient::disconnect_device(). |
|
Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton.
Definition at line 88 of file vrpnButton.cxx. References _button_name. |
|
Receives the button event data from the VRPN code and sends it to any interested VrpnButtonDevices.
Definition at line 140 of file vrpnButton.cxx. |
|
Definition at line 121 of file vrpnButton.cxx. |
|
Definition at line 86 of file vrpnButton.h. Referenced by is_empty(). |
|
Definition at line 85 of file vrpnButton.h. Referenced by unmark(). |
|
Definition at line 89 of file vrpnButton.h. Referenced by get_button_name(), mark(), and ~VrpnButton(). |