28 const std::type_index key(
value.type_info());
31 mooseError(
"ParameterRegistry::set(): Parameter type '",
33 "' is not registered");
39 it->second(
value, field);
std::unordered_map< std::type_index, std::function< void(libMesh::Parameters::Value &value, const hit::Field &)> > _registry
Registration map of type -> function to fill each type.
void set(libMesh::Parameters::Value &value, const hit::Field &field) const
Sets a parameter value given a hit field.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
static Moose::ParameterRegistry & registry
Registry that allows for the typeless setting of a parameter value from a hit field.
ParameterRegistry()
Constructor; private so that it can only be created with the singleton.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Scoped helper for setting Moose::_throw_on_error during this scope.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
static ParameterRegistry & get()
Get the singleton registry.
std::string prettyCppType(const std::string &cpp_type)