Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_systems
InputSystem
InputBindingSystem
InputBindingQuery.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
InputBindingSystem.hpp
"
4
#include <
ivorium_core/ivorium_core.hpp
>
5
6
namespace
iv
7
{
8
9
class
InputBindingQuery
10
{
11
public
:
12
ClientMarker
cm
;
13
InputBindingQuery
(
Instance
* inst );
14
~InputBindingQuery
();
15
Instance
*
instance
()
const
;
16
17
bool
IsBound
(
InputId
inputId,
Input::DeviceKey
device_key );
18
19
bool
IsHoverBound
(
InputId
inputId,
Input::DeviceKey
device_key );
20
25
template
<
class
Callable >
26
void
ForeachBinding
(
InputId
inputId, Callable callable )
27
{
28
if
( !this->ies )
29
return
;
30
this->ies->
ForeachBinding
( inputId, callable );
31
}
32
36
template
<
class
Callable >
37
void
ForeachHoverBinding
(
InputId
inputId, Callable callable )
38
{
39
if
( !this->ies )
40
return
;
41
this->ies->
ForeachHoverBinding
( inputId, callable );
42
}
43
44
private
:
45
Instance
* inst;
46
InputBindingSystem
* ies;
47
};
48
49
}