InputBindingQuery.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "InputBindingSystem.hpp"
5 
6 namespace iv
7 {
8 
10 {
11 public:
13  InputBindingQuery( Instance * inst );
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 }