Convenience methods for implementing main().
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 15 Jul 2013 04:23:06 +0000 (07:23 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 22 Jul 2013 09:56:09 +0000 (11:56 +0200)
commit38b5214700d2d32a0cbbf8d8a08658b5e66b2099
tree8cf24848b5085349e0c571eb7ac2362f0caca53d
parent42dc41099461c51fe88bd72123f41f3df0ac2d41
Convenience methods for implementing main().

Added a method to TrajectoryAnalysisCommandLineRunner that allows a
one-line main() method in user tools, removing some boilerplate code
that could break with Gromacs changes.  Forward the actual
implementation to CommandLineModuleManager, allowing it to do the same
processing as it does for the wrapper binary/symlinks to it.  This
allows for some simplification of TrajectoryAnalysisCommandLineRunner.

An extra method that runs any
  int (*method)(int argc, char *argv[])
method that calls parse_common_args() as main() through
CommandLineModuleManager could also be added, but left out of this
change for now.

Change-Id: I0b0d626fda50abe04c16e90a1c876262dcff81a4
share/template/template.cpp
share/template/template_doc.cpp
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/commandline/cmdlinemodulemanager.h
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/trajectoryanalysis/cmdlinerunner.h
src/gromacs/trajectoryanalysis/modules.cpp
src/gromacs/trajectoryanalysis/tests/moduletest.cpp
src/gromacs/utility/programinfo.cpp
src/gromacs/utility/programinfo.h