Gromacs
2024.3
|
#include <gromacs/options/abstractoption.h>
Abstract base class for specifying option properties.
Concrete classes should normally not derive directly from this class, but from OptionTemplate instead. Classes derived from this class are mainly designed to implement the "named parameter" idiom. For efficiency and clarity, these classes should only store values provided to them. All error checking and memory management should be postponed to the point when the actual option is created.
Subclasses should override createStorage() to create the correct type of storage object. If they use their own info type derived from OptionInfo, they should also have a public typedef InfoType
that specifies that info type. This is required for Options::addOption() to return the correct info type.