00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef VRPNDIAL_H
00016 #define VRPNDIAL_H
00017
00018 #include "pandabase.h"
00019
00020 #include "vrpn_interface.h"
00021
00022 #include "pvector.h"
00023
00024 class VrpnDialDevice;
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class VrpnDial {
00043 public:
00044 VrpnDial(const string &dial_name, vrpn_Connection *connection);
00045 ~VrpnDial();
00046
00047 INLINE const string &get_dial_name() const;
00048 INLINE bool is_empty() const;
00049
00050 void mark(VrpnDialDevice *device);
00051 void unmark(VrpnDialDevice *device);
00052
00053 INLINE void poll();
00054
00055 void output(ostream &out) const;
00056 void write(ostream &out, int indent_level = 0) const;
00057
00058 private:
00059 static void VRPN_CALLBACK
00060 vrpn_dial_callback(void *userdata, const vrpn_DIALCB info);
00061
00062 private:
00063 string _dial_name;
00064 vrpn_Dial_Remote *_dial;
00065
00066 typedef pvector<VrpnDialDevice *> Devices;
00067 Devices _devices;
00068 };
00069
00070 INLINE ostream &operator << (ostream &out, const VrpnDial &dial) {
00071 dial.output(out);
00072 return out;
00073 }
00074
00075 #include "vrpnDial.I"
00076
00077 #endif