When you do have a large if/else or switch in a single function, you do have an "un-clean" code.
The general solution would be to consider inheritance as I think the end result is actually what you want.
the argument would be a reference to a class object for example if you are using the keyboard you could do something similar to:
class control{
public:
void apply(Keys &keys){} = 0;
}
class LightControl public control{
private void toggleLights(void);
public:
void apply(Keys &keys){
if(keys.isPressed(Keys.L)) toggleLights();
}
}
Then you could have a ControlsManager static class where you just push controls:
ControlsManager.add(LightControl());
the ControlsManager has an update function that loops on all controls and calls apply every gameloop (sending the key presses).
The following advice is not for performance, it is just a clean code approach (
http://books.google.com.lb/books/about/Clean_Code.html?id=dwSfGQAACAAJ&redir_esc=y);