Uniform code path for writing out console help.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 8 Sep 2013 17:34:42 +0000 (20:34 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 19 Sep 2013 03:28:15 +0000 (05:28 +0200)
commit1c73f59fc8814e8df5e1ae375874107eeef5574f
tree13efe46481fb60428a71b4d8e4dac7dc91bd3559
parentf107cc6f5853c3d428818fbb848985e90eeb9963
Uniform code path for writing out console help.

Now both 'gmx help <module>' and 'gmx <module> -h' trigger exactly the
same code path, making things a lot easier to work with.
Some notable things:
 - Moved the responsibility to parse the -hidden argument into the
   wrapper binary, from where it gets passed down in
   CommandLineHelpContext.  Quite a few files are touched by this.
 - The -h option now causes all other options to the module get ignored.
   g_tune_pme requires some other approach to deal with option
   validation, but even adding a separate command-line option for only
   this purpose is probably better than the multiple code paths that
   were there before this change.
 - Related to the above, the help output could be significantly
   simplified, since it no longer depends on the command-line.
 - Removed the -verbose option that caused the options to be printed
   during a normal run.  Possible to add back if people want it, but it
   simplifies things if it isn't needed.

Related to #685 and #969.

Change-Id: Ibe735711f650eafaecf28ffb1ed92da97dcb81b6
16 files changed:
src/gromacs/commandline/cmdlinehelpcontext.cpp
src/gromacs/commandline/cmdlinehelpcontext.h
src/gromacs/commandline/cmdlinehelpwriter.cpp
src/gromacs/commandline/cmdlinehelpwriter.h
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/commandline/tests/cmdlinehelpwriter.cpp
src/gromacs/commandline/tests/cmdlinemodulemanager.cpp
src/gromacs/gmxana/gmx_tune_pme.c
src/gromacs/gmxlib/pargs.c
src/gromacs/gmxlib/statutil.cpp
src/gromacs/legacyheaders/readinp.h
src/gromacs/onlinehelp/wman.cpp
src/gromacs/onlinehelp/wman.h
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp
src/gromacs/trajectoryanalysis/runnercommon.h