https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
43void
InputParameters validParams()
Base class for actions.
Definition Action.h:38
static InputParameters validParams()
Definition Action.C:26
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void suppressParameter(const std::string &name)
This method suppresses an inherited parameter so that it isn't required or valid in the derived class...
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.
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...
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.
InputParameters _moose_object_pars
The parameters for the object to be created.
static InputParameters validParams()
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
Method to add a relationship manager for the objects being added to the system.
MooseObjectAction(const InputParameters &params)
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
RelationshipManagerType
Main types of Relationship Managers.