#include <gromacs/options/repeatingsection.h>
template<class T>
class gmx::RepeatingOptionSectionHandle< T >
Allows adding options to an RepeatingOptionSection.
An instance of this class is returned from IOptionsContainerWithSections::addSection(), and supports adding options and subsections to a section created with OptionSection.
Example:
struct SectionData { int value; }
std::vector<SectionData> values;
{
}
|
| RepeatingOptionSectionHandle (internal::OptionSectionImpl *section) |
| Wraps a given section storage object.
|
|
T & | bind () |
| Supports storing option values within the per-section data structure. More...
|
|
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...
|
|
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.
template<class OptionType >
OptionType::InfoType* gmx::IOptionsContainer::addOption |
( |
const OptionType & |
settings | ) |
|
|
inlineinherited |
Adds a recognized option.
- Template Parameters
-
OptionType | Type of the options description object. |
- Parameters
-
[in] | settings | Option description. |
- Returns
- OptionInfo object for the created option (never NULL).
- Exceptions
-
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.
- Examples:
- template.cpp.
template<class SectionType >
SectionType::HandleType gmx::IOptionsContainerWithSections::addSection |
( |
const SectionType & |
section | ) |
|
|
inlineinherited |
Adds a section to this collection.
- Template Parameters
-
SectionType | Type of the section description object. |
- Parameters
-
[in] | section | Section description. |
- Returns
- AbstractOptionSectionHandle object for the created option.
- Exceptions
-
APIError | if invalid option settings are provided. |
Options can be added to the section through the returned handle.
Supports storing option values within the per-section data structure.
See class documentation for an example.
The documentation for this class was generated from the following file: