81 const std::map<std::string, std::unique_ptr<ChainControlDataBase>> &
103 template <
typename T>
109 if (!hasChainControlDataOfType<T>(data_name))
112 "' was requested with the type '",
113 MooseUtils::prettyCppType<T>(),
114 "' but has the type '",
124 template <
typename T>
129 auto & data = getChainControlData<T>(data_name);
130 if (!data.getDeclared())
133 data.setChainControl(chain_control);
136 mooseError(
"The chain control data '", data_name,
"' has already been declared.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
ChainControlDataSystem(MooseApp &app)
Base class for MOOSE-based applications.
ChainControlData< T > & declareChainControlData(const std::string &data_name, ChainControl &chain_control)
Declares chain control data of of the given name and type and creates if it does not exist...
void copyValuesBack()
Copies current chain control data values into old values.
std::map< std::string, std::unique_ptr< ChainControlDataBase > > _chain_control_data_map
Map of chain control data name to its value.
ChainControlData< T > & getChainControlData(const std::string &data_name)
Gets the chain control data of the given name and type and creates if it does not exist...
MooseApp & _app
The MooseApp that owns this system.
bool hasChainControlData(const std::string &data_name) const
Queries if the chain control data of the given name exists.
bool hasChainControlDataOfType(const std::string &data_name) const
Queries if the chain control data of the given name and type exists.
System that manages ChainControls.
Concrete definition of a parameter value for a specified type.
const std::map< std::string, std::unique_ptr< ChainControlDataBase > > & getChainControlDataMap() const
Gets the map of ChainControlData names to the relevant ChainControlDataBase.
Control that additionally provides the capability to produce/consume data values, to allow control op...