Abstract definition of a ChainControlData value. More...
#include <ChainControlData.h>
Public Member Functions | |
ChainControlDataBase (MooseApp &moose_app, const std::string &name) | |
Constructor. More... | |
virtual | ~ChainControlDataBase ()=default |
virtual std::string | type ()=0 |
String identifying the type of parameter stored. 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... | |
virtual void | copyValuesBack ()=0 |
Copy the current value into the old value. 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... | |
Abstract definition of a ChainControlData value.
Definition at line 20 of file ChainControlData.h.
|
inline |
Constructor.
moose_app | MooseApp object this object belong to |
name | The full (unique) name for this piece of data. |
Definition at line 28 of file ChainControlData.h.
|
virtualdefault |
|
pure virtual |
Copy the current value into the old value.
Implemented in ChainControlData< T >, ChainControlData< bool >, and ChainControlData< Real >.
|
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.
const ChainControl & ChainControlDataBase::getChainControl | ( | ) | const |
Get the pointer to the control object that declared this control data.
Definition at line 13 of file ChainControlData.C.
|
inline |
Get the declared state.
Definition at line 67 of file ChainControlData.h.
|
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.
|
inline |
The full (unique) name of this particular piece of data.
Definition at line 47 of file ChainControlData.h.
Referenced by 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 |
Set the pointer to the control object that declared this control data.
Definition at line 57 of file ChainControlData.h.
|
inline |
Mark the data as declared.
Definition at line 62 of file ChainControlData.h.
|
pure virtual |
String identifying the type of parameter stored.
Must be reimplemented in derived classes.
Implemented in ChainControlData< T >, ChainControlData< bool >, and ChainControlData< Real >.
|
protected |
The control object that declared this control data.
Definition at line 80 of file ChainControlData.h.
Referenced by getChainControl(), and setChainControl().
|
protected |
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 getDeclared(), and setDeclared().
|
protected |
The full (unique) name of this particular piece of data.
Definition at line 76 of file ChainControlData.h.
Referenced by 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().