Add helper for generic C++ command-line modules
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 9 Dec 2014 16:54:25 +0000 (18:54 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 28 Dec 2014 20:21:47 +0000 (21:21 +0100)
commit696671e028a1f39a117ff452d2ca4fe50b419856
tree2b69be8fbca81ff1327b082450eb147cfe547fe7
parent0bce085830c633c0274ab08790df01ded09adf2b
Add helper for generic C++ command-line modules

Add a helper class (gmx::CommandLineOptionsModuleInterface) that makes
it easier to implement proper C++ command-line modules for the wrapper
binary.  The module only needs to implement the interface instead of
gmx::CommandLineModuleInterface, and the helper class then takes care of
command-line parsing and help, based on options initialized by the
module in initOptions().  This removes the need to duplicate
command-line parsing and help code into each module.

Change-Id: I3e213ce530532bd3f60e34fd261fe06797d10326
docs/doxygen/lib/wrapperbinary.md
docs/doxygen/user/usinglibrary.md
src/gromacs/commandline.h
src/gromacs/commandline/CMakeLists.txt
src/gromacs/commandline/cmdlineinit.cpp
src/gromacs/commandline/cmdlineinit.h
src/gromacs/commandline/cmdlinemodule.h
src/gromacs/commandline/cmdlineoptionsmodule.cpp [new file with mode: 0644]
src/gromacs/commandline/cmdlineoptionsmodule.h [new file with mode: 0644]
src/testutils/cmdlinetest.cpp
src/testutils/cmdlinetest.h