https://mooseframework.inl.gov
ConditionalEnableControl.h
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 #pragma once
11 
12 #include "Control.h"
13 
18 {
19 public:
21 
23 
24  virtual void execute() override;
25 
26 protected:
33  virtual bool conditionMet(const unsigned int & i) = 0;
34 
36  const std::vector<std::string> & _enable;
37 
39  const std::vector<std::string> & _disable;
40 
42  const bool & _reverse_on_false;
43 };
const std::vector< std::string > & _disable
List of objects to disable if condition is met.
ConditionalEnableControl(const InputParameters &parameters)
virtual void execute() override
Execute the control.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const bool & _reverse_on_false
When true, the disable/enable lists are set to opposite values when the specified condition is false...
virtual bool conditionMet(const unsigned int &i)=0
Condition that must be true for an entry of the "enable" list to be enabled and/or an entry of the "d...
static InputParameters validParams()
const std::vector< std::string > & _enable
List of objects to enable if condition is met.
Base class for Control objects.
Definition: Control.h:33
const InputParameters & parameters() const
Get the parameters of the object.
Base class for controls that enable/disable object(s) based on some condition.