We need a data structure that keeps track of the matrix of (options x commands). It would be convenient if the code could produce this matrix automatically as part of the documentation. And the (currently manually edited) statements about which commands a given option is available for could also be automatically generated.
One question is whether it makes more sense to define the option-to-command mapping in Params.cpp when the option is defined (e.g., have a required argument to the Init{Bool,...} options that is a list of commands) or when the command is defined (i.e., as is currently done by getOptions). I guess it's probably more intuitive for the coder to do it the way it's currently set up.
Kaipo, is there an enumerate type of command that we could use to iterate over all commands? And is there an easy way to iterate over all options?
Bill
I think it might make more sense to define the mapping in Params.cpp, just so everything is in one place. It wouldn't be hard to change but probably time consuming since we have to go through every single parameter and change it. Some of the parameters that are ubiquitous like overwrite and verbosity we would need to remember to add to when we add a new command.
It would be pretty easy to iterate over both commands and options if we need to.