00001 #ifndef QRK_USB_JOYSTICK_H 00002 #define QRK_USB_JOYSTICK_H 00003 00013 #include "Joystick.h" 00014 #include <memory> 00015 00016 00017 namespace qrk 00018 { 00020 class UsbJoystick : public Joystick 00021 { 00022 public: 00023 UsbJoystick(void); 00024 ~UsbJoystick(void); 00025 00026 const char* what(void) const; 00027 bool connect(int id = 0); 00028 void disconnect(void); 00029 bool isConnected(void) const; 00030 size_t axisNum(void) const; 00031 int axisValue(size_t index); 00032 size_t buttonsNum(void) const; 00033 bool isButtonPressed(size_t index); 00034 00040 size_t joystickNum(void); 00041 00042 void setEvent(void* event); 00043 00044 private: 00045 UsbJoystick(const UsbJoystick& rhs); 00046 UsbJoystick& operator = (const UsbJoystick& rhs); 00047 00048 struct pImpl; 00049 const std::auto_ptr<pImpl> pimpl; 00050 }; 00051 } 00052 00053 #endif /* !QRK_JOYSTICK_H */
1.7.6.1-20120122