37 _type(params.getObjectType()),
38 _name(params.getObjectName()),
41 mooseAssert(
_type.size(),
"Type is empty");
42 mooseAssert(
_name.size(),
"Name is empty");
56 return type() + std::string(
" \"") +
name() + std::string(
"\"");
69 mooseError(
"uniqueName(): Object does not have a unique name");
75 const std::string & object_type,
76 const std::string & object_name,
77 const std::string & object_parameter)
const 83 const auto base_type = factory.getValidParams(object_type).getBase();
85 ip_warehouse.addControllableParameterConnection(primary_name, secondary_name);
87 const auto & tags =
_pars.
get<std::vector<std::string>>(
"control_tags");
88 for (
const auto & tag : tags)
95 ip_warehouse.addControllableParameterConnection(
96 tagged_name, secondary_name,
false);
103 const bool with_prefix,
104 const hit::Node * node )
const 113 const bool with_prefix,
114 const hit::Node * node)
119 std::string multiapp_prefix =
"";
123 multiapp_prefix = app->
name();
137 std::string prefix =
"";
148 const std::string base = params.
hasBase() ? params.
getBase() :
"object";
150 prefix +=
"The following occurred in the ";
152 prefix +=
"main " + base;
156 prefix +=
" '" +
name +
"'";
158 return prefix +
"\n\n";
164 if (
const auto hit_node = params.
getHitNode())
165 if (!hit_node->isRoot())
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.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
const InputParameters & _pars
The object's parameters.
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
const std::string & _name
The name of this class.
Base class for everything in MOOSE with a name and a type.
static const std::string type_param
The name of the parameter that contains the object type.
static const std::string main_app_name
The name for the "main" moose application.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Base class for MOOSE-based applications.
MooseObjectName uniqueName() const
MooseObjectParameterName uniqueParameterName(const std::string ¶meter_name) const
static const std::string unique_name_param
The name of the parameter that contains the unique object name.
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
const std::string & name() const
Get the name of the class.
static const std::string moose_base_param
The name of the parameter that contains the moose system base.
An inteface for the _console for outputting to the Console object.
const std::string & type() const
Get the type of this class.
std::string typeAndName() const
Get the class's combined type and name; useful in error handling.
MooseApp & _app
The MOOSE application this is associated with.
void mooseErrorRaw(std::string msg, const std::string &prefix="", const hit::Node *node=nullptr)
Main callback for emitting a moose error.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
void mooseConsole()
Send current output buffer to Console output objects.
A class for storing an input parameter name.
const std::string & getBase() const
const hit::Node * getHitNode() const
std::string hitMessagePrefix(const hit::Node &node)
Get the prefix to be associated with a hit node for a message.
A class for storing the names of MooseObject by tag and object name.
const std::string & _type
The type of this class.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
static InputParameters validParams()
void connectControllableParams(const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
Connect controllable parameter of this action with the controllable parameters of the objects added b...
MooseBase(const InputParameters ¶ms)
Primary constructor for general objects.
std::string messagePrefix(const bool hit_prefix=true) const