14 WebServerControlTypeRegistry &
18 if (!registry_singleton)
20 return *registry_singleton;
27 if (
const auto it = name_map.find(type); it != name_map.end())
29 mooseAssert(it->second,
"Item is nullptr");
30 return it->second.get();
38 if (
const auto obj =
query(type))
40 mooseError(
"WebServerControlTypeRegistry: The type '", type,
"' is not registered");
49 const std::string & type)
50 : _name(
name), _type(type)
std::string name(const ElemQuality q)
Base registry class for a type that is used to build values.
static WebServerControlTypeRegistry & getRegistry()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
ControlledValueBase(const std::string &name, const std::string &type)
Constructor.
RegisteredTypeBase(const std::string &type)
A static registry used to register and build values of different types for the WebServerControl.
static const RegisteredTypeBase * query(const std::string &type)
Query the registration for the given type.
std::map< std::string, std::unique_ptr< RegisteredTypeBase > > _name_map
The registration data.
static const RegisteredTypeBase & get(const std::string &type)
Get the registration for the given type, erroring if it isn't registered.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...