NEML2 1.4.0
|
Abstract definition of an option.
#include <OptionSet.h>
Classes | |
struct | Metadata |
Public Member Functions | |
virtual | ~OptionBase ()=default |
virtual bool | operator== (const OptionBase &other) const =0 |
Test for option equality. | |
virtual bool | operator!= (const OptionBase &other) const =0 |
Test for option inequality. | |
const std::string & | name () const |
A readonly reference to the option's name. | |
const std::string & | type () const |
A readonly reference to the option's type. | |
const FType & | ftype () const |
A readonly reference to the option's ftype. | |
FType & | ftype () |
A writable reference to the option's ftype. | |
const std::string & | doc () const |
A readonly reference to the option's docstring. | |
std::string & | doc () |
A writable reference to the option's docstring. | |
const bool & | suppressed () const |
A readonly reference to the option's suppression status. | |
bool & | suppressed () |
A writable reference to the option's suppression status. | |
virtual void | print (std::ostream &) const =0 |
virtual std::unique_ptr< OptionBase > | clone () const =0 |
Protected Attributes | |
struct neml2::OptionSet::OptionBase::Metadata | _metadata |
|
virtualdefault |
|
pure virtual |
Clone this value. Useful in copy-construction. Must be reimplemented in derived classes.
Implemented in OptionSet::Option< T >.
|
inline |
A writable reference to the option's docstring.
|
inline |
A readonly reference to the option's docstring.
|
inline |
A writable reference to the option's ftype.
|
inline |
A readonly reference to the option's name.
|
pure virtual |
Test for option inequality.
Implemented in OptionSet::Option< T >.
|
pure virtual |
Test for option equality.
Implemented in OptionSet::Option< T >.
Prints the option value to the specified stream. Must be reimplemented in derived classes.
Implemented in OptionSet::Option< T >.
|
inline |
A writable reference to the option's suppression status.
|
inline |
A readonly reference to the option's type.
|
protected |