VoltAir
|
Base interface for constructing virtual controllers from a deviceId. More...
Public Member Functions | |
virtual VirtualController * | createNewController (int deviceId) const =0 |
Returns a new VirtualController for the specified deviceId . More... | |
virtual bool | intersects (const ControllerFactory &otherFactory) const =0 |
Returns whether or not this ControllerFactory intersects (i.e. overlaps input schemes) with the specified ControllerFactory. More... | |
virtual bool | handlesControllerEvent (const ControllerEvent *event) const =0 |
Returns whether or not this ControllerFactory can process the specified event . More... | |
Static Public Member Functions | |
template<typename Input > | |
static bool | isValidInputScheme (const InputScheme< Input > &scheme, std::set< Input > &validInputs) |
Returns whether or not the given InputScheme is valid (i.e. only contains input mappings which are valid) according to the specified validation set. More... | |
Base interface for constructing virtual controllers from a deviceId.
In essence, classes that derive from this interface implicitly define controller types by specifying the particular input schemes supported by that controller type. Furthermore, factories act as an encapsulation of component input schemes that comprise a controller.
|
pure virtual |
Returns a new VirtualController for the specified deviceId
.
deviceId | Id to identify the constructed VirtualController |
Implemented in KeyboardRouter::KeyboardControllerFactory, GamepadRouter::GamepadControllerFactory, and TouchNavigationRouter::TouchNavigationControllerFactory.
|
pure virtual |
Returns whether or not this ControllerFactory can process the specified event
.
event | ControllerEvent to check for affinity with this ControllerFactory |
Implemented in GamepadRouter::GamepadControllerFactory, TouchNavigationRouter::TouchNavigationControllerFactory, and KeyboardRouter::KeyboardControllerFactory.
|
pure virtual |
Returns whether or not this ControllerFactory intersects (i.e. overlaps input schemes) with the specified ControllerFactory.
true
for handlesControllerEvent() when passed the same event. otherFactory | ControllerFactory to test for intersection with this |
Implemented in GamepadRouter::GamepadControllerFactory, TouchNavigationRouter::TouchNavigationControllerFactory, and KeyboardRouter::KeyboardControllerFactory.
|
inlinestatic |
Returns whether or not the given InputScheme is valid (i.e. only contains input mappings which are valid) according to the specified validation set.
scheme | InputScheme to validate |
validInputs | Set of inputs to validate all inputs in the InputScheme against |