Gromacs
2024.4
|
#include <gromacs/commandline/cmdlinemodulemanager_impl.h>
Internal data for a CommandLineModuleManager module group.
This class contains the state of a module group. CommandLineModuleGroup provides the public interface to construct/alter the state, and CommandLineModuleManager and its associated classes use it for help output.
Public Types | |
typedef std::vector< std::pair < std::string, const char * > > | ModuleList |
Shorthand for a list of modules contained in the group. More... | |
Public Member Functions | |
CommandLineModuleGroupData (const CommandLineModuleMap &modules, const char *binaryName, const char *title) | |
Constructs an empty module group. More... | |
const char * | title () const |
Returns the title for the group. | |
const ModuleList & | modules () const |
Returns the list of modules in the group. | |
void | addModule (const char *name, const char *description) |
Adds a module to the group. More... | |
typedef std::vector<std::pair<std::string, const char*> > gmx::CommandLineModuleGroupData::ModuleList |
Shorthand for a list of modules contained in the group.
The first element in the contained pair contains the tag (gmx-something) of the module, and the second element contains the description. The second element is never NULL.
|
inline |
Constructs an empty module group.
[in] | modules | List of all modules (used for checking and default descriptions). |
[in] | binaryName | Name of the binary containing the modules. |
[in] | title | Title of the group. |
Does not throw.
void gmx::CommandLineModuleGroupData::addModule | ( | const char * | name, |
const char * | description | ||
) |
Adds a module to the group.
[in] | name | Name of the module. |
[in] | description | Description of the module in this group. |
std::bad_alloc | if out of memory. |
If description
is NULL, the description returned by the module is used.