Original Post
Ok, here is the situation.
In the core of my engine, I have wrapper for some type of input system. Then, at a higher higher leve (the level I want my logic code to interact with) I have what I am calling a CommandManager (which is a working name, really). The question is: how should the CommandManager find out which keys are bound to which "commands" previously registered by the logic code? Another class, ConfigManager handles loading config files and settings. I am not worried right now about performance drawbacks (although I want the design to be well thought out enough to make modifications later). So far, I have considered three designs, but not too deeply.
1. Create a structure inside CommandManager to map keys->commands. This means the CommandManager is responsible for maintaining the list.
2. Have the responsibility to map keys->commands within ConfigManager. When the CommandManager wants to update the command states, it asks ConfigManager what keys are bound to which commands, and then asks the input wrapper if those keys are down. ConfigManager is responsible for keeping the list of keys.
3. Create another structure, outside both CommandManager and ConfigManager whose responsibility is to keep track of the bindings.
Since the responsibility of changing the key bound to a funtion should logically rest with the ConfigManager, how does this information get propogated to the CommandManager? In #2, it would be easy, although the process of updating command states would be lengthy. I suppose in #1 the CommandManager could have a ChangeCommandBinding() function. Actually, I''m not sure exactly how #3 would work, anyway.
Ok, the process of writing my thoughts out here helped clarify things a little, and I think #1 is the way I will implement it. I''ll still post this because I would definitely be interested in feedback. I have zero experience in any kind of design at all.