Registry that allows for the typeless setting of a parameter value from a hit field. More...
#include <ParameterRegistry.h>
Public Member Functions | |
| template<class T , class F > | |
| char | add (F &&f) |
| Add a parameter. | |
| void | set (libMesh::Parameters::Value &value, const hit::Field &field) const |
| Sets a parameter value given a hit field. | |
Static Public Member Functions | |
| static ParameterRegistry & | get () |
| Get the singleton registry. | |
Private Member Functions | |
| ParameterRegistry () | |
| Constructor; private so that it can only be created with the singleton. | |
| FRIEND_TEST (::ParameterRegistryTest, add) | |
| FRIEND_TEST (::ParameterRegistryTest, addExists) | |
| FRIEND_TEST (::ParameterRegistryTest, set) | |
| FRIEND_TEST (::ParameterRegistryTest, setNotRegistered) | |
| FRIEND_TEST (::ParameterRegistryTest, setCatchMooseError) | |
Private Attributes | |
| 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. | |
Registry that allows for the typeless setting of a parameter value from a hit field.
Definition at line 43 of file ParameterRegistry.h.
|
inlineprivate |
Constructor; private so that it can only be created with the singleton.
Definition at line 66 of file ParameterRegistry.h.
Referenced by get().
| char Moose::ParameterRegistry::add | ( | F && | f | ) |
Add a parameter.
Definition at line 84 of file ParameterRegistry.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
Get the singleton registry.
Definition at line 17 of file ParameterRegistry.C.
Referenced by Moose::Builder::extractParams().
| void Moose::ParameterRegistry::set | ( | libMesh::Parameters::Value & | value, |
| const hit::Field & | field | ||
| ) | const |
Sets a parameter value given a hit field.
Definition at line 26 of file ParameterRegistry.C.
Referenced by Moose::Builder::extractParams().
|
private |
Registration map of type -> function to fill each type.
Definition at line 79 of file ParameterRegistry.h.