Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::CommandLineModuleGroupData Class Reference

#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 * > > 
 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 ModuleListmodules () const
 Returns the list of modules in the group.
void addModule (const char *name, const char *description)
 Adds a module to the group. More...

Member Typedef Documentation

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.

Constructor & Destructor Documentation

gmx::CommandLineModuleGroupData::CommandLineModuleGroupData ( const CommandLineModuleMap modules,
const char *  binaryName,
const char *  title 

Constructs an empty module group.

[in]modulesList of all modules (used for checking and default descriptions).
[in]binaryNameName of the binary containing the modules.
[in]titleTitle of the group.

Does not throw.

Member Function Documentation

void gmx::CommandLineModuleGroupData::addModule ( const char *  name,
const char *  description 

Adds a module to the group.

[in]nameName of the module.
[in]descriptionDescription of the module in this group.
std::bad_allocif out of memory.

If description is NULL, the description returned by the module is used.

The documentation for this class was generated from the following files: