00001 #ifndef OSDL_CLASSICAL_JOYSTICK_H_
00002 #define OSDL_CLASSICAL_JOYSTICK_H_
00003
00004
00005 #include "OSDLJoystickCommon.h"
00006 #include "OSDLJoystick.h"
00007
00008 #include <string>
00009 #include <list>
00010
00011
00012
00013 namespace OSDL
00014 {
00015
00016
00017 namespace Events
00018 {
00019
00020
00021
00040 class OSDL_DLL ClassicalJoystick : public Joystick
00041 {
00042
00043
00044
00045
00046
00047
00048
00049 friend class OSDL::Events::JoystickHandler ;
00050
00051
00052 public:
00053
00054
00061 explicit ClassicalJoystick( JoystickNumber index,
00062 AxisPosition deadZoneExtent = DefaultDeadZoneExtent )
00063 throw() ;
00064
00065
00070 virtual ~ClassicalJoystick() throw() ;
00071
00072
00073
00084 virtual void getDeadZoneValues( AxisPosition & firstAxisExtent,
00085 AxisPosition & secondAxisExtent ) const throw() ;
00086
00087
00098 virtual void setDeadZoneValues(
00099 AxisPosition firstAxisExtent = DefaultDeadZoneExtent,
00100 AxisPosition secondAxisExtent = DefaultDeadZoneExtent )
00101 throw() ;
00102
00103
00104
00116 virtual const std::string toString(
00117 Ceylan::VerbosityLevels level = Ceylan::high )
00118 const throw() ;
00119
00120
00121 static const AxisPosition DefaultDeadZoneExtent ;
00122
00123
00124
00125
00126 protected :
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00146 virtual void axisChanged(
00147 const JoystickAxisEvent & joystickEvent ) throw() ;
00148
00149
00159 virtual void buttonPressed(
00160 const JoystickButtonEvent & joystickEvent ) throw() ;
00161
00162
00172 virtual void buttonReleased(
00173 const JoystickButtonEvent & joystickEvent ) throw() ;
00174
00175
00176
00188 AxisPosition _deadZoneExtentFirstAxis ;
00189
00190
00202 AxisPosition _deadZoneExtentSecondAxis ;
00203
00204
00205
00206 private:
00207
00208
00209
00218 explicit ClassicalJoystick( const Joystick & source ) throw() ;
00219
00220
00229 ClassicalJoystick & operator = ( const Joystick & source )
00230 throw() ;
00231
00232
00233 } ;
00234
00235 }
00236
00237 }
00238
00239
00240
00241 #endif // OSDL_CLASSICAL_JOYSTICK_H_