Panda3D
|
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. | |
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 | output (std::ostream &out) const |
void | poll () |
Polls the connected device. | |
void | unmark (VrpnButtonDevice *device) |
Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton. | |
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.
VrpnButton::VrpnButton | ( | const std::string & | button_name, |
vrpn_Connection * | connection ) |
Definition at line 26 of file vrpnButton.cxx.
VrpnButton::~VrpnButton | ( | ) |
Definition at line 38 of file vrpnButton.cxx.
|
inline |
Returns the name of the button device that was used to create this VrpnButton.
Definition at line 18 of file vrpnButton.I.
|
inline |
Returns true if no VrpnButtonDevices reference this VrpnButton, or false otherwise.
Definition at line 27 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 47 of file vrpnButton.cxx.
void VrpnButton::output | ( | std::ostream & | out | ) | const |
Definition at line 85 of file vrpnButton.cxx.
void VrpnButton::poll | ( | ) |
Polls the connected device.
Normally you should not call this directly; this will be called by the VrpnClient.
Definition at line 77 of file vrpnButton.cxx.
void VrpnButton::unmark | ( | VrpnButtonDevice * | device | ) |
Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton.
Definition at line 59 of file vrpnButton.cxx.
void VrpnButton::write | ( | std::ostream & | out, |
int | indent_level = 0 ) const |
Definition at line 93 of file vrpnButton.cxx.