24 const std::string &
name = obj->_classname;
25 const std::string & task = obj->_name;
27 auto key = std::make_pair(
name, task);
39 std::shared_ptr<Action>
41 const std::string & full_action_name,
48 std::pair<ActionFactory::iterator, ActionFactory::iterator> iters;
50 const std::string unique_action_name =
51 action + incoming_parser_params.
get<std::string>(
"task") + full_action_name;
55 unique_action_name, incoming_parser_params, 0, {});
57 if (!action_params.getHitNode())
73 action_params.finalize(action_name);
76 BuildInfo * build_info = &(iters.first->second);
79 std::string(
"Unable to find buildable Action from supplied InputParameters Object for ") +
84 std::shared_ptr<Action> action_obj = build_info->
_obj_pointer->buildAction(action_params);
87 if (action_params.get<std::string>(
"task") ==
"")
88 action_obj->appendTask(build_info->
_task);
104 mooseError(std::string(
"A '") +
name +
"' is not a registered Action\n\n");
120 return iter->second._task;
149 std::pair<std::multimap<std::string, std::string>::const_iterator,
150 std::multimap<std::string, std::string>::const_iterator>
156 std::set<std::string>
159 std::set<std::string> tasks;
161 std::pair<std::multimap<std::string, ActionFactory::BuildInfo>::const_iterator,
162 std::multimap<std::string, ActionFactory::BuildInfo>::const_iterator>
164 for (std::multimap<std::string, ActionFactory::BuildInfo>::const_iterator it = iters.first;
167 tasks.insert(it->second._task);
std::string name(const ElemQuality q)
static const std::string name_param
The name of the parameter that contains the object name.
static const std::string app_param
The name of the parameter that contains the MooseApp.
static const std::string type_param
The name of the parameter that contains the object type.
InputParameters getValidParams(const std::string &name)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
std::pair< std::multimap< std::string, std::string >::const_iterator, std::multimap< std::string, std::string >::const_iterator > getActionsByTask(const std::string &task) const
Returns begin and end iterators in a multimap from tasks to actions names.
std::set< std::string > getTasksByAction(const std::string &action) const
void reg(std::shared_ptr< RegistryEntryBase > obj)
Base class for MOOSE-based applications.
Storage for action instances.
static const std::string unique_action_name_param
The name of the parameter that contains the unique action name.
FileLineInfo getLineInfo(const std::string &name, const std::string &task) const
Gets file and line information where an action was registered.
std::set< std::string > _tasks
The registered tasks.
const hit::Node * getCurrentActionHitNode() const
FileLineInfo getInfo(const std::string &key0) const
Get file/line info for a key.
void addInfo(const std::string &key0, const std::string &file, int line)
Associate a key with file/line info.
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters ¶meters)
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
std::multimap< std::string, BuildInfo >::iterator iterator
Typedef for registered Action iterator.
FileLineInfoMap _name_to_line
std::shared_ptr< RegistryEntryBase > _obj_pointer
ActionFactory(MooseApp &app)
std::set< std::pair< std::string, std::string > > _current_objs
set<objectname, task> used to track if an object previously added is being added again ...
std::multimap< std::string, BuildInfo >::const_iterator const_iterator
const Parser & parser() const
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
std::vector< const InputParameters * > _currently_constructing
The object's parameters that are currently being constructed (if any).
Holds file and line information.
std::multimap< std::string, BuildInfo > _name_to_build_info
std::string getTaskName(const std::string &action)
std::multimap< std::string, std::string > _task_to_action_map
const InputParameters * currentlyConstructing() const