www.mooseframework.org
DeprecatedBlockAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "DeprecatedBlockAction.h"
11 
12 registerMooseAction("MooseApp", DeprecatedBlockAction, "deprecated_block");
13 
16 {
18  params.addClassDescription("Tool for marking input syntax as deprecated.");
19  params.addParam<bool>("DEPRECATED", "*** WARNING: This block is deprecated - DO NOT USE ***");
20  return params;
21 }
22 
24  : Action(parameters)
25 {
26 }
27 
28 void
30 {
31  mooseError("Input file block '" + name() + "' has been deprecated.");
32 }
DeprecatedBlockAction(const InputParameters &parameters)
registerMooseAction("MooseApp", DeprecatedBlockAction, "deprecated_block")
void act() override
Method to add objects to the simulation or perform other setup tasks.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
Base class for actions.
Definition: Action.h:38
static InputParameters validParams()
Definition: Action.C:24
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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 option parameter and a documentation string to the InputParameters object...
Used for marking that some block are deprecated and not be used.