Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::OptionManagerContainer Class Reference

#include <gromacs/options/optionmanagercontainer.h>

Description

Container to keep managers added with Options::addManager() and pass them to options.

Consistency of the managers (e.g., that there is at most one manager of a certain type) is only checked when the managers are accessed.

Public Member Functions

bool empty () const
 Returns true if there are no managers.
 
void add (IOptionManager *manager)
 Adds a manager to the container.
 
template<class ManagerType >
ManagerType * get () const
 Retrieves a manager of a certain type. More...
 

Member Function Documentation

template<class ManagerType >
ManagerType* gmx::OptionManagerContainer::get ( ) const
inline

Retrieves a manager of a certain type.

Template Parameters
ManagerTypeType of manager to retrieve (should derive from IOptionManager).
Returns
The manager, or NULL if there is none.

This method is used in AbstractOption::createStorage() to retrieve a manager of a certain type for options that use a manager.

The return value is NULL if there is no manager of the given type. The caller needs to handle this (either by asserting, or by handling the manager as optional).


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