Print default file names for command-line help.
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 7 May 2012 03:56:55 +0000 (06:56 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Mon, 7 May 2012 03:56:55 +0000 (06:56 +0300)
commit4cce7c9dab6611c14b94bf070c6c9c0514e03c52
tree38edde7fb7381f2d578e0eb03d55f0a47ff7d025
parent4db1c85a4793d9e39e742354eaef0897e574aad4
Print default file names for command-line help.

Print the value set with defaultValueIfSet() for a file name option in
the command-line help if no other value is provided for the option.

- The value is formatted by the AbstractOptionStorage::formatValue()
  pure virtual method when a special index is provided.
- OptionStorageTemplate implements handling of this special index, and
  provides a new pure virtual method formatSingleValue() to do the
  actual formatting, which no longer needs to know where the value comes
  from.
- Adjust the concrete option storage classes to the changes.

IssueID #666.

Change-Id: I8b51262042415f314bd5d4c8da51e6e31cfe3b21
13 files changed:
src/gromacs/commandline/cmdlinehelpwriter.cpp
src/gromacs/commandline/tests/refdata/CommandLineHelpWriterTest_HandlesOptionTypes.xml
src/gromacs/options/abstractoption.cpp
src/gromacs/options/abstractoptionstorage.h
src/gromacs/options/basicoptions.cpp
src/gromacs/options/basicoptionstorage.h
src/gromacs/options/filenameoption.cpp
src/gromacs/options/filenameoptionstorage.h
src/gromacs/options/optioninfo.h
src/gromacs/options/optionstoragetemplate.h
src/gromacs/options/tests/abstractoptionstorage.cpp
src/gromacs/selection/selectionoption.cpp
src/gromacs/selection/selectionoptionstorage.h