Concrete definition of a parameter value for a specified type. More...
#include <ChainControlData.h>
Public Member Functions | |
ChainControlData (MooseApp &moose_app, std::string name) | |
Constructor. More... | |
const T & | get () const |
const T & | getOld () const |
T & | set () |
virtual std::string | type () override |
String identifying the type of parameter stored. More... | |
virtual void | copyValuesBack () override |
Copy the current value into the old value. More... | |
const std::string & | name () const |
The full (unique) name of this particular piece of data. More... | |
const ChainControl & | getChainControl () const |
Get the pointer to the control object that declared this control data. More... | |
void | setChainControl (ChainControl &ctrl) |
Set the pointer to the control object that declared this control data. More... | |
void | setDeclared () |
Mark the data as declared. More... | |
bool | getDeclared () |
Get the declared state. More... | |
Protected Member Functions | |
template<typename T , typename... Args> | |
T & | declareRestartableData (const std::string &data_name, Args &&... args) |
Declare a piece of data as "restartable" and initialize it. More... | |
template<typename T , typename... Args> | |
ManagedValue< T > | declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args) |
Declares a piece of "managed" restartable data and initialize it. More... | |
template<typename T , typename... Args> | |
const T & | getRestartableData (const std::string &data_name) const |
Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object. More... | |
template<typename T , typename... Args> | |
T & | declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args) |
Declare a piece of data as "restartable" and initialize it. More... | |
template<typename T , typename... Args> | |
T & | declareRecoverableData (const std::string &data_name, Args &&... args) |
Declare a piece of data as "recoverable" and initialize it. More... | |
template<typename T , typename... Args> | |
T & | declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args) |
Declare a piece of data as "restartable". More... | |
template<typename T , typename... Args> | |
T & | declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args) |
Declare a piece of data as "restartable". More... | |
std::string | restartableName (const std::string &data_name) const |
Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix. More... | |
Protected Attributes | |
const std::string | _name |
The full (unique) name of this particular piece of data. More... | |
bool | _declared |
true if the data was declared by calling declareControlData. All data must be declared up front. More... | |
ChainControl * | _chain_control |
The control object that declared this control data. More... | |
MooseApp & | _restartable_app |
Reference to the application. More... | |
const std::string | _restartable_system_name |
The system name this object is in. More... | |
const THREAD_ID | _restartable_tid |
The thread ID for this object. More... | |
const bool | _restartable_read_only |
Flag for toggling read only status (see ReporterData) More... | |
Private Attributes | |
T & | _value |
Current value. More... | |
T & | _value_old |
Old value. More... | |
Concrete definition of a parameter value for a specified type.
Definition at line 88 of file ChainControlData.h.
|
inline |
Constructor.
name | The full (unique) name for this piece of data. |
Definition at line 95 of file ChainControlData.h.
|
inlineoverridevirtual |
Copy the current value into the old value.
Implements ChainControlDataBase.
Definition at line 140 of file ChainControlData.h.
|
protectedinherited |
Declares a piece of "managed" restartable data and initialize it.
Here, "managed" restartable data means that the caller can destruct this data upon destruction of the return value of this method. Therefore, this ManagedValue<T> wrapper should survive after the final calls to dataStore() for it. That is... at the very end.
This is needed for objects whose destruction ordering is important, and enables natural c++ destruction in reverse construction order of the object that declares it.
See delcareRestartableData and declareRestartableDataWithContext for more information.
Definition at line 276 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "recoverable" and initialize it.
This means that in the event of a restart this piece of data will be restored back to its previous value.
Note - this data will NOT be restored on Restart!
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
args | Arguments to forward to the constructor of the data |
Definition at line 351 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable" and initialize it.
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
args | Arguments to forward to the constructor of the data |
Definition at line 269 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable" and initialize it.
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
context | Context pointer that will be passed to the load and store functions |
args | Arguments to forward to the constructor of the data |
Definition at line 294 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable".
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
object_name | A supplied name for the object that is declaring this data. |
args | Arguments to forward to the constructor of the data |
Definition at line 323 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable".
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
object_name | A supplied name for the object that is declaring this data. |
context | Context pointer that will be passed to the load and store functions |
args | Arguments to forward to the constructor of the data |
Definition at line 333 of file Restartable.h.
|
inline |
Definition at line 105 of file ChainControlData.h.
Referenced by ChainControlDataPostprocessor::getValue().
|
inherited |
Get the pointer to the control object that declared this control data.
Definition at line 13 of file ChainControlData.C.
|
inlineinherited |
Get the declared state.
Definition at line 67 of file ChainControlData.h.
|
inline |
|
protectedinherited |
Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData
but returns a const reference to the object.
Forwarded arguments are not allowed in this case because we assume that the object is restarted and we won't need different constructors to initialize it.
NOTE: This returns a const reference! Make sure you store it in a const reference!
data_name | The name of the data (usually just use the same name as the member variable) |
Definition at line 287 of file Restartable.h.
|
inlineinherited |
The full (unique) name of this particular piece of data.
Definition at line 47 of file ChainControlData.h.
Referenced by ChainControlDataBase::getChainControl().
|
protectedinherited |
Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.
This should only be used in this interface and in testing.
Definition at line 66 of file Restartable.C.
Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().
|
inline |
Definition at line 115 of file ChainControlData.h.
|
inlineinherited |
Set the pointer to the control object that declared this control data.
Definition at line 57 of file ChainControlData.h.
|
inlineinherited |
Mark the data as declared.
Definition at line 62 of file ChainControlData.h.
|
inlineoverridevirtual |
String identifying the type of parameter stored.
Implements ChainControlDataBase.
Definition at line 133 of file ChainControlData.h.
|
protectedinherited |
The control object that declared this control data.
Definition at line 80 of file ChainControlData.h.
Referenced by ChainControlDataBase::getChainControl(), and ChainControlDataBase::setChainControl().
|
protectedinherited |
true if the data was declared by calling declareControlData. All data must be declared up front.
Definition at line 78 of file ChainControlData.h.
Referenced by ChainControlDataBase::getDeclared(), and ChainControlDataBase::setDeclared().
|
protectedinherited |
The full (unique) name of this particular piece of data.
Definition at line 76 of file ChainControlData.h.
Referenced by ChainControlDataBase::name().
|
protectedinherited |
Reference to the application.
Definition at line 227 of file Restartable.h.
Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().
|
protectedinherited |
Flag for toggling read only status (see ReporterData)
Definition at line 236 of file Restartable.h.
Referenced by Restartable::registerRestartableDataOnApp().
|
protectedinherited |
The system name this object is in.
Definition at line 230 of file Restartable.h.
Referenced by Restartable::restartableName().
|
protectedinherited |
The thread ID for this object.
Definition at line 233 of file Restartable.h.
Referenced by Restartable::declareRestartableDataHelper().
|
private |
Current value.
Definition at line 126 of file ChainControlData.h.
Referenced by ChainControlData< Real >::get(), and ChainControlData< Real >::set().
|
private |
Old value.
Definition at line 128 of file ChainControlData.h.
Referenced by ChainControlData< Real >::getOld().