Gromacs
2024.3
|
#include <gromacs/options/abstractsection.h>
Base class for handles to option sections.
This class implements the common functionality for adding options and subsections to option sections.
Public Member Functions | |
IOptionsContainer & | addGroup () override |
Creates a subgroup of options within the current options. More... | |
template<class SectionType > | |
SectionType::HandleType | addSection (const SectionType §ion) |
Adds a section to this collection. More... | |
template<class OptionType > | |
OptionType::InfoType * | addOption (const OptionType &settings) |
Adds a recognized option. More... | |
Protected Member Functions | |
GMX_DEFAULT_CONSTRUCTORS (IOptionsContainerWithSections) | |
GMX_DEFAULT_CONSTRUCTORS (IOptionsContainer) | |
|
overridevirtual |
Creates a subgroup of options within the current options.
To add options to the group, use the returned interface.
Currently, this is only used to influence the order of options: all options in a group appear before options in a group added after it, no matter in which order the options are added to the groups. In the future, the groups could also be used to influence the help output.
Implements gmx::IOptionsContainer.
|
inlineinherited |
Adds a recognized option.
OptionType | Type of the options description object. |
[in] | settings | Option description. |
APIError | if invalid option settings are provided. |
The return value is a pointer for more convenient use in callers: often callers need to declare the variable that will hold the return value in wider scope than would be achieved by declaring it at the site where addOption() is called. The returned pointer must not be freed.
See class documentation for example usage.
|
inlineinherited |
Adds a section to this collection.
SectionType | Type of the section description object. |
[in] | section | Section description. |
APIError | if invalid option settings are provided. |
Options can be added to the section through the returned handle.