27#include "neml2/base/NEML2Object.h"
28#include "neml2/models/BufferStore.h"
30#include "neml2/base/Registry.h"
31#include "neml2/base/Factory.h"
54 template <
typename T,
typename =
typename std::enable_if_t<std::is_base_of_v<Data, T>>>
60 auto data = Factory::get_object_ptr<Data>(
"Data",
name,
extra_opts);
62 return *(std::dynamic_pointer_cast<T>(data));
Interface for object which can store buffers.
Definition BufferStore.h:36
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
T & register_data(const std::string &name)
Definition Data.h:55
const std::vector< Data * > & registered_data() const
All the registered data objects.
Definition Data.h:48
std::vector< Data * > _registered_data
Registered Data objects.
Definition Data.h:66
Data(const OptionSet &options)
Construct a new Data object.
Definition Data.cxx:37
static OptionSet expected_options()
Definition Data.cxx:30
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
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