27class EXPCL_PANDA_DEVICE ClientDevice :
public InputDevice {
29 ClientDevice(ClientBase *client,
TypeHandle device_type,
30 const std::string &device_name);
33 virtual ~ClientDevice();
42 virtual void output(std::ostream &out)
const;
43 virtual void write(std::ostream &out,
int indent_level = 0)
const;
53 static void init_type() {
54 InputDevice::init_type();
56 InputDevice::get_class_type());
59 return get_class_type();
61 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
66 friend class ClientBase;
69INLINE std::ostream &operator <<(std::ostream &out,
const ClientDevice &device) {
An abstract base class for a family of client device interfaces–including trackers,...
Any of a number of different devices that might be attached to a ClientBase, including trackers,...
virtual void output(std::ostream &out) const
Writes a one-line string describing the device.
void disconnect()
Disconnects the ClientDevice from its ClientBase object.
ClientBase * get_client() const
Returns the ClientBase this device is associated with.
virtual void do_poll() final
Causes the connected ClientBase to poll all of its clients, if necessary.
TypeHandle get_device_type() const
Returns the type of device this is considered to be to the ClientBase: a ClientTrackerDevice,...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...