Panda3D
Public Member Functions
VrpnButton Class Reference

This is the actual interface to a particular VRPN button device, and all of its numbered buttons. More...

#include "vrpnButton.h"

List of all members.

Public Member Functions

 VrpnButton (const string &button_name, vrpn_Connection *connection)
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 output (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 (ostream &out, int indent_level=0) const

Detailed Description

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 42 of file vrpnButton.h.


Member Function Documentation

const string & VrpnButton::get_button_name ( ) const [inline]

Returns the name of the button device that was used to create this VrpnButton.

Definition at line 22 of file vrpnButton.I.

bool VrpnButton::is_empty ( ) const [inline]

Returns true if no VrpnButtonDevices reference this VrpnButton, or false otherwise.

Definition at line 33 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 55 of file vrpnButton.cxx.

void VrpnButton::poll ( ) [inline]

Polls the connected device.

Normally you should not call this directly; this will be called by the VrpnClient.

Definition at line 45 of file vrpnButton.I.

Referenced by VrpnClient::do_poll().

Removes the indicated VrpnButtonDevice from the list of devices that are sharing this VrpnButton.

Definition at line 69 of file vrpnButton.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations