Gromacs
5.1.4
|
Command line module for a trajectory analysis module.
Public Member Functions | |
RunnerCommandLineModule (const char *name, const char *description, ModuleFactoryMethod factory) | |
Constructs a module. More... | |
virtual const char * | name () const |
Returns the name of the module. | |
virtual const char * | shortDescription () const |
Returns a one-line description of the module. | |
virtual void | init (CommandLineModuleSettings *settings) |
Initializes the module and provides settings for the runner. More... | |
virtual int | run (int argc, char *argv[]) |
Runs the module with the given arguments. More... | |
virtual void | writeHelp (const CommandLineHelpContext &context) const |
Prints help for the module. More... | |
|
inline |
Constructs a module.
[in] | name | Name for the module. |
[in] | description | One-line description for the module. |
[in] | factory | Factory method to create the analysis module. |
Does not throw. This is important for correct implementation of runAsMain().
|
virtual |
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.
Implements gmx::CommandLineModuleInterface.
|
virtual |
Runs the module with the given arguments.
[in] | argc | Number of elements in argv . |
[in] | argv | Command-line arguments. |
unspecified | May throw exceptions to indicate errors. |
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.
Implements gmx::CommandLineModuleInterface.
|
virtual |
Prints help for the module.
[in] | context | Context object for writing the help. |
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 master rank.
Implements gmx::CommandLineModuleInterface.