RAII owner for input provider and callback registrations.
More...
#include <InputManager.h>
|
| void | bindTo (InputManager &inputManager) |
| | Binds this scope to a manager, resetting existing registrations when the manager changes.
|
RAII owner for input provider and callback registrations.
Add handles returned by InputManager to the scope. The scope removes those registrations when InputBindingScope::reset() runs or when the scope is destroyed.
A scope is bound to one InputManager at a time. Adding a handle from a different manager resets the current registrations before binding to the new manager.
Definition at line 407 of file InputManager.h.
◆ InputBindingScope() [1/4]
| Input::InputBindingScope::InputBindingScope |
( |
| ) |
|
|
default |
◆ InputBindingScope() [2/4]
| Input::InputBindingScope::InputBindingScope |
( |
InputManager & | inputManager | ) |
|
|
explicit |
Creates a scope bound to an input manager.
- Parameters
-
| inputManager | Manager used by later registrations added without rebinding. |
◆ InputBindingScope() [3/4]
◆ InputBindingScope() [4/4]
Moves ownership of tracked registrations from another scope.
- Parameters
-
| other | Scope to move from. The moved-from scope becomes unbound. |
References InputBindingScope().
◆ ~InputBindingScope()
| Input::InputBindingScope::~InputBindingScope |
( |
| ) |
|
Removes tracked registrations.
◆ add() [1/2]
Tracks a callback registration for automatic removal.
- Parameters
-
| inputManager | Manager that owns the callback handle. |
| handle | Callback handle returned by an InputManager on-action function. |
Invalid handles are ignored. Passing a different manager resets all currently tracked registrations first.
◆ add() [2/2]
Tracks a provider registration for automatic removal.
- Parameters
-
| inputManager | Manager that owns the provider handle. |
| handle | Provider handle returned by an InputManager bind function. |
Invalid handles are ignored. Passing a different manager resets all currently tracked registrations first.
◆ bindTo()
| void Input::InputBindingScope::bindTo |
( |
InputManager & | inputManager | ) |
|
|
private |
Binds this scope to a manager, resetting existing registrations when the manager changes.
- Parameters
-
| inputManager | Manager that owns subsequently tracked handles. |
◆ operator=() [1/2]
◆ operator=() [2/2]
Removes current registrations, then moves registrations from another scope.
- Parameters
-
| other | Scope to move from. The moved-from scope becomes unbound. |
- Returns
- Reference to this scope.
References InputBindingScope().
◆ reset()
| void Input::InputBindingScope::reset |
( |
| ) |
|
Removes all tracked registrations and unbinds the scope.
Calling reset on an unbound or already reset scope only clears stored handles.
◆ callbackHandles_
◆ inputManager_
| InputManager* Input::InputBindingScope::inputManager_ = nullptr |
|
private |
Manager that owns the tracked handles, or nullptr when unbound.
Definition at line 477 of file InputManager.h.
◆ providerHandles_
The documentation for this class was generated from the following file:
- /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Input/InputManager.h