Gromacs
2025.0-dev-20241011-013a99c
|
#include <gromacs/options/optionmanagercontainer.h>
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... | |
|
inline |
Retrieves a manager of a certain type.
ManagerType | Type of manager to retrieve (should derive from IOptionManager). |
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).