9 class InputBindingListener;
46 virtual std::string
debug_name()
const override {
return "InputBindingSystem"; }
75 template<
class Callable >
78 auto it = this->hover_binds.find( inputId );
79 if( it == this->hover_binds.end() )
82 Binds
const & bind = it->second;
84 for(
auto const & dev_key : bind.device )
85 callable( dev_key.first, dev_key.second );
87 for(
auto const & key : bind.all )
96 template<
class Callable >
99 auto it = this->binds.find( inputId );
100 if( it == this->binds.end() )
103 Binds
const & bind = it->second;
105 for(
auto const & dev_key : bind.device )
106 callable( dev_key.first, dev_key.second );
108 for(
auto const & key : bind.all )
113 void binding_changed();
118 std::unordered_set< Input::Key > all;
119 std::unordered_set< Input::DeviceKey, Input::DeviceKey_Hash > device;
122 std::unordered_map< InputId, Binds > binds;
123 std::unordered_map< InputId, Binds > hover_binds;
125 volatile_set< InputBindingListener * > listeners;