NEML2 2.0.0
|
Concrete definition of an option value for a specified type
#include <OptionSet.h>
Public Member Functions | |
Option (const std::string &name) | |
bool | operator== (const OptionBase &other) const override |
Test for option equality. | |
bool | operator!= (const OptionBase &other) const override |
Test for option inequality. | |
const T & | get () const |
T & | set () |
void | print (std::ostream &) const override |
std::unique_ptr< OptionBase > | clone () const override |
Public Member Functions inherited from OptionSet::OptionBase | |
OptionBase ()=default | |
OptionBase (OptionBase &&)=delete | |
OptionBase (const OptionBase &)=delete | |
OptionBase & | operator= (const OptionBase &)=delete |
OptionBase & | operator= (OptionBase &&)=delete |
virtual | ~OptionBase ()=default |
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. | |
const bool & | user_specified () const |
A readonly reference to the option's user_specified status. | |
bool & | user_specified () |
A writable reference to the option's user_specified status. | |
Additional Inherited Members | |
Protected Attributes inherited from OptionSet::OptionBase | |
struct neml2::OptionSet::OptionBase::Metadata | _metadata |
|
overridevirtual |
Clone this value. Useful in copy-construction. Must be reimplemented in derived classes.
Implements OptionSet::OptionBase.
|
overridevirtual |
Test for option inequality.
Implements OptionSet::OptionBase.
|
overridevirtual |
Test for option equality.
Implements OptionSet::OptionBase.
Prints the option value to the specified stream. Must be reimplemented in derived classes.
Implements OptionSet::OptionBase.
|
inline |