16 #include "libmesh/libmesh_common.h" 25 static Registry * registry_singleton =
nullptr;
26 if (!registry_singleton)
28 return *registry_singleton;
36 for (
const auto & label : labels)
38 r._known_labels.insert(label);
39 if (r._per_label_objects.count(label) == 0)
42 for (
const auto & obj : r._per_label_objects[label])
44 const auto name = obj->name();
45 r._name_to_entry[
name] = obj;
48 if (!obj->_alias.empty())
59 if (
const auto it = r._name_to_entry.find(
name); it != r._name_to_entry.end())
70 for (
const auto & label : labels)
72 r._known_labels.insert(label);
73 if (r._per_label_actions.count(label) == 0)
76 for (
const auto & obj : r._per_label_actions[label])
102 std::find(dfp.begin(), dfp.end(), data_dir) == dfp.end())
103 dfp.push_back(data_dir);
static const RegistryEntryBase & objData(const std::string &name)
static Registry & getRegistry()
Get the global Registry singleton.
Generic factory class for build all sorts of objects.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
bool pathIsDirectory(const std::string &path)
void reg(std::shared_ptr< RegistryEntryBase > obj)
std::pair< std::filesystem::path, std::filesystem::path > splitFileName(const T &full_file)
Function for splitting path and filename.
static void registerObjectsTo(Factory &f, const std::set< std::string > &labels)
This registers all MooseObjects known to the registry that have the given label(s) with the factory f...
virtual const std::string & name() const
Get the name of the class.
static void addDataFilePath(const std::string &path)
register search paths for built-in data files
std::vector< std::string > _data_file_paths
void reg(std::shared_ptr< RegistryEntryBase > obj)
void associateNameToClass(const std::string &name, const std::string &class_name)
Associates an object name with a class name.
static void registerActionsTo(ActionFactory &f, const std::set< std::string > &labels)
This registers all Actions known to the registry that have the given label(s) with the factory f...
Specialized factory for generic Action System objects.
std::set< std::string > _known_labels
std::filesystem::path pathjoin(const std::filesystem::path &p)
The registry is used as a global singleton to collect information on all available MooseObject and Ac...
static char addKnownLabel(const std::string &label)
addKnownLabel whitelists a label as valid for purposes of the checkLabels function.