16 #include "clientDevice.h"
17 #include "clientBase.h"
30 const string &device_name) :
32 _device_type(device_type),
33 _device_name(device_name)
38 _is_connected =
false;
52 nassertv(!_is_connected);
55 unref_delete(_client);
78 _client->disconnect_device(_device_type, _device_name,
this);
79 _is_connected =
false;
81 nassertv(disconnected);
107 output(ostream &out)
const {
117 write(ostream &out,
int indent_level)
const {
118 indent(out, indent_level) << *
this <<
"\n";
void unlock()
Releases the mutex associated with this particular device.
void disconnect()
Disconnects the ClientDevice from its ClientBase object.
virtual ~ClientDevice()
We don't actually call disconnect() at the ClientDevice level destructor, because by the time we get ...
An abstract base class for a family of client device interfaces–including trackers, buttons, dials, and other analog inputs.
void acquire()
Grabs the mutex associated with this particular device.
void poll()
Causes the connected ClientBase to poll all of its clients, if necessary.
bool poll()
Initiates a poll of the client devices, if we are not forked and if we have not already polled this f...
TypeHandle is the identifier used to differentiate C++ class types.
const string & get_device_name() const
Returns the device name reported to the ClientBase.