Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

buttons_vrpn.H

Go to the documentation of this file.
00001 #ifndef _buttons_vrpn_H_
00002 #define _buttons_vrpn_H_
00003 
00004 #include "dev/buttons.H"
00005 #include "dev/polled.H"
00006 #include "vrpn/vrpn_Button.h"
00007 
00008 //
00009 // A VRPN set of buttons
00010 //
00011 class DEVbuttons_VRPN : public DEVice, public DEVpolled {
00012  protected:
00013    class btn_desc {
00014      public:
00015       btn_desc() { }
00016       btn_desc(DEVice_btn *btn, int id) : _button(btn),_id(id) { }
00017       bool operator ==(const btn_desc b) const { return b._button == _button && 
00018                                                   b._id == _id; }
00019       DEVice_btn *_button;
00020       int         _id;
00021    };
00022 
00023    ARRAY<btn_desc>     _buttons;
00024    vrpn_Button_Remote *_vrpndev;
00025 
00026    static  void     vrpn_button_handler(void *emtr, const vrpn_BUTTONCB info);
00027 
00028    /* ------------- DEVpolled methods --------------- */
00029    void             do_poll();
00030 
00031  public:
00032             DEVbuttons_VRPN(Cstr_ptr &name);
00033    virtual ~DEVbuttons_VRPN();
00034 };
00035 
00036 #endif

Generated on Mon Sep 15 16:25:56 2003 for gluebase by doxygen1.2.18