#include <ActionMapInputAdapter.h>
Inheritance diagram for Odyssey::ActionMapInputAdapter:

Public Types | |
| typedef boost::tuples::tuple< InputAdapter *, Callable, InputAdapterPtr > | FilterActionTuple |
| typedef std::map< String, FilterActionTuple > | CallableMap |
| typedef std::map< String, Odyssey::Variable > | AttributeMap |
| typedef ContainerIterator< AttributeMap > | AttributeIterator |
| typedef ConstContainerIterator< AttributeMap > | ConstAttributeIterator |
Public Member Functions | |
| ActionMapInputAdapter () | |
| Constructs an empty instance. | |
| bool | containsFilterAction (const String &name) const |
| Returns true if a filter-action pair exists with the given name. | |
| void | setFilterAction (const String &name, InputAdapter *filter, const Callable &action, bool manage=true) |
| Sets a new callable pair (a filter and an action). | |
| void | setFilterAction (const String &name, InputAdapterPtr filter, const Callable &action) |
| void | setFilter (const String &name, InputAdapter *filter, bool manage=true) |
| Sets just the filter. | |
| void | setFilter (const String &name, InputAdapterPtr filter) |
| void | setAction (const String &name, const Callable &action) |
| Sets just the action. | |
| void | removeFilterAction (const String &name) |
| Removes a named filter action pair. | |
| void | clearFilterActions () |
| Removes all the filter action pairs. | |
| void | setAttribute (const String &name, const Variable &attr) |
| Sets an attribute for the adapter. | |
| Variable | getAttribute (const String &name) const |
| Gets an attribute for the adapter. | |
| void | removeAttribute (const String &name) |
| Removes an attribute. | |
| void | clearAttributes () |
| Clears all attributes. | |
| size_t | getAttributeCount () const |
| Returns the number of stored attributes. | |
| AttributeIterator | getAttributeIterator () |
| Returns an iterator over the stored attributes. | |
| ConstAttributeIterator | getAttributeIterator () const |
| Returns an iterator over the stored attributes. | |
| bool | keyPressed (const OIS::KeyEvent &evt) |
| Called when a key is pressed on the keyboard. | |
| bool | keyReleased (const OIS::KeyEvent &evt) |
| Called when a key is released on the keyboard. | |
| bool | mouseMoved (const OIS::MouseEvent &evt) |
| Called when the mouse is moved. | |
| bool | mousePressed (const OIS::MouseEvent &evt, OIS::MouseButtonID id) |
| Called when a mouse button is pressed. | |
| bool | mouseReleased (const OIS::MouseEvent &evt, OIS::MouseButtonID id) |
| Called when a mouse button is released. | |
| bool | buttonPressed (const OIS::JoyStickEvent &evt, int id) |
| Called when a joystick button is pressed. | |
| bool | buttonReleased (const OIS::JoyStickEvent &evt, int id) |
| Called when a joystick button is released. | |
| bool | axisMoved (const OIS::JoyStickEvent &evt, int axis) |
| Called when a joystick axis is moved. | |
| bool | povMoved (const OIS::JoyStickEvent &evt, int axis) |
| Called when the pov hat on a joystick is moved. | |
Protected Attributes | |
| CallableMap | _callables |
| AttributeMap | _attributes |
This class implements InputAdapter and calls "filters" (which are InputAdapters) to decide whether an "action" (a 1-arity Callable for action name) should be executed. It also stores named attributes, which can be keyed to filter action pair names, or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Constructs an empty instance.
|
|
||||||||||||
|
Called when a joystick axis is moved.
Reimplemented from Odyssey::InputAdapter. |
|
||||||||||||
|
Called when a joystick button is pressed.
Reimplemented from Odyssey::InputAdapter. |
|
||||||||||||
|
Called when a joystick button is released.
Reimplemented from Odyssey::InputAdapter. |
|
|
Clears all attributes.
|
|
|
Removes all the filter action pairs.
|
|
|
Returns true if a filter-action pair exists with the given name.
|
|
|
Gets an attribute for the adapter.
|
|
|
Returns the number of stored attributes.
|
|
|
Returns an iterator over the stored attributes.
|
|
|
Returns an iterator over the stored attributes.
|
|
|
Called when a key is pressed on the keyboard.
Reimplemented from Odyssey::InputAdapter. |
|
|
Called when a key is released on the keyboard.
Reimplemented from Odyssey::InputAdapter. |
|
|
Called when the mouse is moved.
Reimplemented from Odyssey::InputAdapter. |
|
||||||||||||
|
Called when a mouse button is pressed.
Reimplemented from Odyssey::InputAdapter. |
|
||||||||||||
|
Called when a mouse button is released.
Reimplemented from Odyssey::InputAdapter. |
|
||||||||||||
|
Called when the pov hat on a joystick is moved.
Reimplemented from Odyssey::InputAdapter. |
|
|
Removes an attribute.
|
|
|
Removes a named filter action pair.
|
|
||||||||||||
|
Sets just the action. This function sets the action callable for a given named pair. This function will fail silently if there is no pair with the given name.
|
|
||||||||||||
|
Sets an attribute for the adapter.
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Sets just the filter. This function sets the filter callable for a given named pair. This function will fail silently if there is no pair with the given name.
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
Sets a new callable pair (a filter and an action). This function sets up a new filter action item.
|
|
|
|
|
|
|
1.4.6-NO