26#include "neml2/base/OptionSet.h"
65 const std::string &
name()
const {
return _input_options.name(); }
67 const std::string &
type()
const {
return _input_options.type(); }
69 const std::string &
path()
const {
return _input_options.path(); }
71 const std::string &
doc()
const {
return _input_options.doc(); }
74 template <
typename T = NEML2Object>
75 const T *
host()
const;
78 template <
typename T = NEML2Object>
92 auto host_ptr =
dynamic_cast<const T *
>(_host ? _host :
this);
101 auto host_ptr =
dynamic_cast<T *
>(_host ? _host :
this);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
The base class of all "manufacturable" objects in the NEML2 library.
Definition NEML2Object.h:38
const std::string & name() const
A readonly reference to the object's name.
Definition NEML2Object.h:65
const T * host() const
Get a readonly pointer to the host.
Definition NEML2Object.h:90
virtual void setup()
Setup this object.
Definition NEML2Object.h:62
const OptionSet & input_options() const
Definition NEML2Object.h:51
const std::string & type() const
A readonly reference to the object's type.
Definition NEML2Object.h:67
const std::string & doc() const
A readonly reference to the object's docstring.
Definition NEML2Object.h:71
const std::string & path() const
A readonly reference to the object's path.
Definition NEML2Object.h:69
NEML2Object(const OptionSet &options)
Construct a new NEML2Object object.
Definition NEML2Object.cxx:37
static OptionSet expected_options()
Definition NEML2Object.cxx:29
virtual ~NEML2Object()=default
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
Definition CrossRef.cxx:32
void neml_assert(bool assertion, Args &&... args)
Definition error.h:73