#include <gromacs/commandline/cmdlinemodule.h>
Inherited by gmx::CommandLineHelpModule, and gmx::test::MockModule.
Module that can be run from command line using CommandLineModuleManager.
- See Also
- CommandLineModuleManager
-
CommandLineOptionsModule
Initializes the module and provides settings for the runner.
This will be called before run(), and can be used to adjust initialization that the runner does.
This method is currently not called when writing the help.
virtual int gmx::ICommandLineModule::run |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
pure virtual |
Runs the module with the given arguments.
- Parameters
-
[in] | argc | Number of elements in argv . |
[in] | argv | Command-line arguments. |
- Exceptions
-
unspecified | May throw exceptions to indicate errors. |
- Returns
- Exit code for the program.
- Return values
-
0 | on successful termination. |
argv
[0] is the name of the module, i.e., the arguments are as if the module was run as a standalone executable.
Prints help for the module.
- Parameters
-
[in] | context | Context object for writing the help. |
- Exceptions
-
std::bad_alloc | if out of memory. |
FileIOError | on any I/O error. |
Note that for MPI-enabled builds, this is called only on the main rank.
The documentation for this class was generated from the following file: