Sirikata
|
Base class for input responses. More...
#include <InputResponse.hpp>
Public Types | |
typedef std::vector < InputBindingEvent > | InputEventDescriptorList |
Public Member Functions | |
virtual | ~InputResponse () |
virtual void | invoke (InputBindingEvent &evt) |
Invokes the input response for any type of InputEvent. | |
virtual InputEventDescriptorList | getInputEvents (const InputBindingEvent &descriptor) const =0 |
Get a list of InputEventDescriptors which specify the events that this response will handle, given a higher level description of the input to bind to this response. | |
Protected Member Functions | |
virtual void | defaultAction () |
Base class for input responses.
Implementations will generally handle two things: wrap a generic callback, e.g. one requiring a float parameter, and handle translating events to that type of parameter.
typedef std::vector<InputBindingEvent> Sirikata::SimpleCamera::InputResponse::InputEventDescriptorList |
Sirikata::SimpleCamera::InputResponse::~InputResponse | ( | ) | [virtual] |
virtual void Sirikata::SimpleCamera::InputResponse::defaultAction | ( | ) | [inline, protected, virtual] |
Reimplemented in Sirikata::SimpleCamera::SimpleInputResponse.
Referenced by invoke().
virtual InputEventDescriptorList Sirikata::SimpleCamera::InputResponse::getInputEvents | ( | const InputBindingEvent & | descriptor | ) | const [pure virtual] |
Get a list of InputEventDescriptors which specify the events that this response will handle, given a higher level description of the input to bind to this response.
Implemented in Sirikata::SimpleCamera::SimpleInputResponse, Sirikata::SimpleCamera::FloatToggleInputResponse, Sirikata::SimpleCamera::Vector2fInputResponse, and Sirikata::SimpleCamera::AxisInputResponse.
Referenced by Sirikata::SimpleCamera::InputBinding::add().
void Sirikata::SimpleCamera::InputResponse::invoke | ( | InputBindingEvent & | evt | ) | [virtual] |
Invokes the input response for any type of InputEvent.
Reimplemented in Sirikata::SimpleCamera::FloatToggleInputResponse, Sirikata::SimpleCamera::Vector2fInputResponse, and Sirikata::SimpleCamera::AxisInputResponse.
References defaultAction().
Referenced by Sirikata::SimpleCamera::InputBinding::handle().