Panda3D

vrpnAnalogDevice.h
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file vrpnAnalogDevice.h
10 * @author drose
11 * @date 2001-01-26
12 */
13
14 #ifndef VRPNANALOGDEVICE_H
15 #define VRPNANALOGDEVICE_H
16
17 #include "pandabase.h"
18
19 #include "clientAnalogDevice.h"
20
21 class VrpnClient;
22 class VrpnAnalog;
23
24 /**
25 * The Panda interface to a VRPN analog device. This object will be returned
26 * by VrpnClient::make_device(), for attaching to a AnalogNode.
27 *
28 * This class does not need to be exported from the DLL.
29 */
30 class VrpnAnalogDevice : public ClientAnalogDevice {
31 public:
32 VrpnAnalogDevice(VrpnClient *client, const std::string &device_name,
33 VrpnAnalog *vrpn_analog);
34 virtual ~VrpnAnalogDevice();
35
36 INLINE VrpnAnalog *get_vrpn_analog() const;
37
38 private:
39 VrpnAnalog *_vrpn_analog;
40
41 public:
42 static TypeHandle get_class_type() {
43 return _type_handle;
44 }
45 static void init_type() {
46 ClientAnalogDevice::init_type();
47 register_type(_type_handle, "VrpnAnalogDevice",
48 ClientAnalogDevice::get_class_type());
49 }
50 virtual TypeHandle get_type() const {
51 return get_class_type();
52 }
53 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
54
55 private:
56 static TypeHandle _type_handle;
57
58 friend class VrpnAnalog;
59 };
60
61 #include "vrpnAnalogDevice.I"
62
63 #endif
ClientAnalogDevice
A device, attached to the ClientBase by a AnalogNode, that records the data from a single named analo...
Definition: clientAnalogDevice.h:29
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
VrpnAnalogDevice
The Panda interface to a VRPN analog device.
Definition: vrpnAnalogDevice.h:30
VrpnAnalogDevice::get_vrpn_analog
VrpnAnalog * get_vrpn_analog() const
Returns a pointer to the particular VrpnAnalog this device gets its data from.
Definition: vrpnAnalogDevice.I:19
VrpnAnalog
This is the actual interface to a particular VRPN analog device, and all of its numbered controls.
Definition: vrpnAnalog.h:38
VrpnClient
A specific ClientBase that connects to a VRPN server and records information on the connected VRPN de...
Definition: vrpnClient.h:35
clientAnalogDevice.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
vrpnAnalogDevice.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.