Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
orxonox::InputDevice Class Referenceabstract

Abstract base class for all input devices (mouse, keyboard and joy sticks). More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/input/InputDevice.h>

Inheritance diagram for orxonox::InputDevice:
orxonox::InputDeviceTemplated< JoyStickTraits > orxonox::InputDeviceTemplated< KeyboardTraits > orxonox::InputDeviceTemplated< MouseTraits > orxonox::InputDeviceTemplated< Traits > orxonox::JoyStick orxonox::Keyboard orxonox::Mouse

Public Member Functions

 InputDevice (unsigned int id)
 Only resets the members. More...
 
virtual ~InputDevice ()=default
 
virtual void clearBuffers ()=0
 Clear all button related buffers. More...
 
virtual std::string getClassName () const =0
 Returns the device class (derived) name as string. More...
 
unsigned int getDeviceID () const
 Returns the ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard) More...
 
std::vector< InputState * > & getStateListRef ()
 Returns a reference to the internal input state vector. Use with care! More...
 
bool isCalibrating () const
 Tells whether the device is in calibration mode. More...
 
void startCalibration ()
 Start calibrating (only useful for joy sticks) More...
 
void stopCalibration ()
 Stop calibrating and evaluate the data (only useful for joy sticks) More...
 
virtual void update (const Clock &time)=0
 Updates the device which should in turn distribute events. More...
 

Protected Member Functions

virtual void calibrationStarted ()
 To be ovrridden by the subclass. More...
 
virtual void calibrationStopped ()
 To be ovrridden by the subclass. More...
 

Protected Attributes

std::vector< InputState * > inputStates_
 List of all input states that receive events from this device. More...
 

Private Member Functions

 InputDevice (const InputDevice &)=delete
 
InputDeviceoperator= (const InputDevice &)=delete
 

Private Attributes

bool bCalibrating_
 Whether the device is in calibration mode. More...
 
const unsigned int deviceID_
 ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard) More...
 

Detailed Description

Abstract base class for all input devices (mouse, keyboard and joy sticks).

It provides common virtual functions to be used by the InputManager.

Constructor & Destructor Documentation

orxonox::InputDevice::InputDevice ( unsigned int  id)
inline

Only resets the members.

virtual orxonox::InputDevice::~InputDevice ( )
virtualdefault
orxonox::InputDevice::InputDevice ( const InputDevice )
privatedelete

Member Function Documentation

virtual void orxonox::InputDevice::calibrationStarted ( )
inlineprotectedvirtual

To be ovrridden by the subclass.

Reimplemented in orxonox::JoyStick.

virtual void orxonox::InputDevice::calibrationStopped ( )
inlineprotectedvirtual

To be ovrridden by the subclass.

Reimplemented in orxonox::JoyStick.

virtual void orxonox::InputDevice::clearBuffers ( )
pure virtual
virtual std::string orxonox::InputDevice::getClassName ( ) const
pure virtual
unsigned int orxonox::InputDevice::getDeviceID ( ) const
inline

Returns the ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard)

std::vector<InputState*>& orxonox::InputDevice::getStateListRef ( )
inline

Returns a reference to the internal input state vector. Use with care!

bool orxonox::InputDevice::isCalibrating ( ) const
inline

Tells whether the device is in calibration mode.

InputDevice& orxonox::InputDevice::operator= ( const InputDevice )
privatedelete
void orxonox::InputDevice::startCalibration ( )
inline

Start calibrating (only useful for joy sticks)

void orxonox::InputDevice::stopCalibration ( )
inline

Stop calibrating and evaluate the data (only useful for joy sticks)

virtual void orxonox::InputDevice::update ( const Clock time)
pure virtual

Member Data Documentation

bool orxonox::InputDevice::bCalibrating_
private

Whether the device is in calibration mode.

const unsigned int orxonox::InputDevice::deviceID_
private

ID of the device (the same as in InputDeviceEnumerator for mouse and keyboard)

std::vector<InputState*> orxonox::InputDevice::inputStates_
protected

List of all input states that receive events from this device.


The documentation for this class was generated from the following file: