00001
00003
00004
00005
00006
00007
00009
00011
00012
00013
00015
00016 #ifndef _VRJGA_BUTTON_DEVICE_H_
00017 #define _VRJGA_BUTTON_DEVICE_H_
00018
00019 #include "vrjGA/Referenced.h"
00020
00021 #include "gadget/Type/DigitalInterface.h"
00022
00023 #include <string>
00024
00025
00026 namespace vrjGA {
00027
00028
00029 class VRJ_GA_EXPORT ButtonDevice : public Referenced
00030 {
00031 public:
00032
00033
00034 typedef Referenced BaseClass;
00035 typedef gadget::DigitalInterface DI;
00036
00038 VRJGA_DECLARE_POINTER ( ButtonDevice );
00039
00040
00041 ButtonDevice ( unsigned long mask, const std::string &name );
00042
00043
00044 unsigned long mask() const { return _mask; }
00045
00046
00047 unsigned long state() const;
00048
00049 protected:
00050
00051 virtual ~ButtonDevice();
00052
00053 private:
00054
00055
00056 ButtonDevice ( const ButtonDevice & );
00057 ButtonDevice& operator = ( const ButtonDevice & );
00058
00059 DI _di;
00060 unsigned long _mask;
00061 };
00062
00063
00064 };
00065
00066
00067 #endif // _VRJGA_BUTTON_DEVICE_H_