Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::RepeatingOptionSectionHandle< T > Class Template Reference

#include <gromacs/options/repeatingsection.h>

+ Inheritance diagram for gmx::RepeatingOptionSectionHandle< T >:
+ Collaboration diagram for gmx::RepeatingOptionSectionHandle< T >:

Description

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; }
// as class attribute
std::vector<SectionData> values;
{
auto sec = options->addSection(gmx::RepeatingOptionSection<SectionData>("sec").storeVector(&values));
sec->addOption(gmx::IntegerOption("arg").store(&sec.bind().value));
}

Public Member Functions

 RepeatingOptionSectionHandle (internal::OptionSectionImpl *section)
 Wraps a given section storage object.
 
T & bind ()
 Supports storing option values within the per-section data structure. More...
 
- Public Member Functions inherited from gmx::AbstractOptionSectionHandle
IOptionsContaineraddGroup () override
 Creates a subgroup of options within the current options. More...
 
- Public Member Functions inherited from gmx::IOptionsContainerWithSections
template<class SectionType >
SectionType::HandleType addSection (const SectionType &section)
 Adds a section to this collection. More...
 
- Public Member Functions inherited from gmx::IOptionsContainer
template<class OptionType >
OptionType::InfoType * addOption (const OptionType &settings)
 Adds a recognized option. More...
 

Additional Inherited Members

- Protected Member Functions inherited from gmx::AbstractOptionSectionHandle
 AbstractOptionSectionHandle (internal::OptionSectionImpl *section)
 Wraps a given section storage object.
 
- Static Protected Member Functions inherited from gmx::AbstractOptionSectionHandle
template<typename StorageType >
static StorageType * getStorage (internal::OptionSectionImpl *section)
 Returns the storage for a particular type of section. More...
 

Member Function Documentation

template<class T >
T& gmx::RepeatingOptionSectionHandle< T >::bind ( )
inline

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: