Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
MooseObjectAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "MooseObject.h"
11 #include "MooseObjectAction.h"
12 #include "MooseUtils.h"
13 #include "Factory.h"
14 #include "Conversion.h"
15 #include "MooseMesh.h"
16 #include "MooseApp.h"
17 
20 {
22  params.addRequiredParam<std::string>(
23  "type", "A string representing the Moose Object that will be built by this Action");
24  params.addParam<bool>("isObjectAction", true, "Indicates that this is a MooseObjectAction.");
25  params.suppressParameter<bool>("isObjectAction");
26  params.addClassDescription("Base class for all the actions creating a MOOSE object");
27  return params;
28 }
29 
31  : Action(params),
32  _type(getParam<std::string>("type")),
33  // We will create a second parameters object from the main factory unless instructed otherwise
34  _moose_object_pars(!params.have_parameter<bool>("skip_param_construction") ||
35  (params.have_parameter<bool>("skip_param_construction") &&
36  !params.get<bool>("skip_param_construction"))
37  ? _factory.getValidParams(_type)
39 {
41 }
42 
43 void
45 {
47 }
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:963
static InputParameters validParams()
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1122
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams()
Base class for actions.
Definition: Action.h:33
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void suppressParameter(const std::string &name)
This method suppresses an inherited parameter so that it isn&#39;t required or valid in the derived class...
MooseObjectAction(const InputParameters &params)
static InputParameters validParams()
Definition: Action.C:24
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
Method to add a relationship manager for the objects being added to the system.
InputParameters _moose_object_pars
The parameters for the object to be created.
std::string blockFullpath() const
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...