VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Member Functions | List of all members
JoystickAxisScheme Class Reference

Represents a scheme mapping input joystick axes to output actions. More...

Inheritance diagram for JoystickAxisScheme:
InputScheme< JoystickAxisCode >

Public Member Functions

 JoystickAxisScheme ()
 Constructs an empty JoystickAxisScheme. More...
 
 JoystickAxisScheme (const typename InputScheme< JoystickAxisCode >::Map &scheme)
 Constructs a JoystickAxisScheme from the specified scheme. More...
 
virtual bool handlesControllerEvent (const ControllerEvent *event) const override
 Returns whether or not this JoystickAxisScheme would handle event. More...
 
- Public Member Functions inherited from InputScheme< JoystickAxisCode >
 InputScheme ()
 Constructs an empty input scheme. More...
 
 InputScheme (const Map &scheme)
 Constructs an InputScheme from the specified input to action map. More...
 
bool empty () const
 Returns whether or not the InputScheme contains any mappings. More...
 
Map::const_iterator begin () const
 Returns a const iterator positioned at the beginning of the InputScheme. More...
 
Map::const_iterator end () const
 Returns a const iterator positioned at the end of the InputScheme. More...
 
bool hasActionFor (const JoystickAxisCode &input) const
 Returns whether or not this input scheme has an action associated with the specified input. More...
 
bool intersects (const InputScheme< JoystickAxisCode > &inputScheme) const
 Returns whether or not inputScheme intersects with this InputScheme. More...
 

Additional Inherited Members

- Public Types inherited from InputScheme< JoystickAxisCode >
typedef int Action
 Output type. More...
 
typedef std::map
< JoystickAxisCode, Action
Map
 Input "event" to Action output map. More...
 

Detailed Description

Represents a scheme mapping input joystick axes to output actions.

Constructor & Destructor Documentation

JoystickAxisScheme::JoystickAxisScheme ( )
inline

Constructs an empty JoystickAxisScheme.

JoystickAxisScheme::JoystickAxisScheme ( const typename InputScheme< JoystickAxisCode >::Map scheme)
inline

Constructs a JoystickAxisScheme from the specified scheme.

Parameters
schemeInputScheme mapping JoystickAxisCodes to actions

Member Function Documentation

virtual bool JoystickAxisScheme::handlesControllerEvent ( const ControllerEvent event) const
inlineoverridevirtual

Returns whether or not this JoystickAxisScheme would handle event.

Parameters
eventControllerEvent to check against the JoystickAxisScheme inputs

Implements InputScheme< JoystickAxisCode >.