VoltAir
|
Represents a scheme mapping generic input "events" to output "actions". More...
Public Types | |
typedef int | Action |
Output type. More... | |
typedef std::map< Input, Action > | Map |
Input "event" to Action output map. More... | |
Public Member Functions | |
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 Input &input) const |
Returns whether or not this input scheme has an action associated with the specified input . More... | |
bool | intersects (const InputScheme< Input > &inputScheme) const |
Returns whether or not inputScheme intersects with this InputScheme. More... | |
virtual bool | handlesControllerEvent (const ControllerEvent *event) const =0 |
Returns whether or not this InputScheme would handle event . More... | |
Represents a scheme mapping generic input "events" to output "actions".
typedef int InputScheme< Input >::Action |
Output type.
typedef std::map<Input, Action> InputScheme< Input >::Map |
Input "event" to Action output map.
|
inline |
Constructs an empty input scheme.
|
inlineexplicit |
Constructs an InputScheme from the specified input to action map.
scheme | Map from which to construct the InputScheme |
|
inline |
Returns a const iterator positioned at the beginning of the InputScheme.
|
inline |
Returns whether or not the InputScheme contains any mappings.
|
inline |
Returns a const iterator positioned at the end of the InputScheme.
|
pure virtual |
Returns whether or not this InputScheme would handle event
.
event | ControllerEvent to check for information on inputs in this InputScheme |
Implemented in JoystickAxisScheme, KeyScheme, and TriggerAxisScheme.
|
inline |
Returns whether or not this input scheme has an action associated with the specified input
.
input | Input to check for the existence of the associated action |
|
inline |
Returns whether or not inputScheme
intersects with this InputScheme.
inputScheme | InputScheme to check for intersection against |