Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes | List of all members
Restartable::ManagedValue< T > Class Template Reference

Wrapper class for restartable data that is "managed. More...

#include <Restartable.h>

Public Member Functions

 ManagedValue (RestartableData< T > &value)
 
 ~ManagedValue ()
 Destructor. More...
 
const T & get () const
 Get the restartable value. More...
 
T & set ()
 

Private Attributes

RestartableData< T > & _value
 The underlying data. More...
 

Detailed Description

template<typename T>
class Restartable::ManagedValue< T >

Wrapper class for restartable data that is "managed.

'

Managed here means that the destruction of the data is managed by the reciever and not the app.

When this wrapper is destructed, the underlying restartable data is also destructed. This allows for proper construction ordered destruction.

Definition at line 42 of file Restartable.h.

Constructor & Destructor Documentation

◆ ManagedValue()

template<typename T>
Restartable::ManagedValue< T >::ManagedValue ( RestartableData< T > &  value)
inline

Definition at line 45 of file Restartable.h.

45 : _value(value) {}
RestartableData< T > & _value
The underlying data.
Definition: Restartable.h:64

◆ ~ManagedValue()

template<typename T>
Restartable::ManagedValue< T >::~ManagedValue ( )
inline

Destructor.

Destructs the managed restartable data.

Definition at line 52 of file Restartable.h.

52 { _value.reset(); }
RestartableData< T > & _value
The underlying data.
Definition: Restartable.h:64

Member Function Documentation

◆ get()

template<typename T>
const T& Restartable::ManagedValue< T >::get ( ) const
inline

Get the restartable value.

Definition at line 58 of file Restartable.h.

58 { return _value.get(); }
RestartableData< T > & _value
The underlying data.
Definition: Restartable.h:64

◆ set()

template<typename T>
T& Restartable::ManagedValue< T >::set ( )
inline

Definition at line 59 of file Restartable.h.

Referenced by FEProblemBase::es(), and FEProblemBase::initialSetup().

59 { return _value.set(); }
RestartableData< T > & _value
The underlying data.
Definition: Restartable.h:64

Member Data Documentation

◆ _value

template<typename T>
RestartableData<T>& Restartable::ManagedValue< T >::_value
private

The documentation for this class was generated from the following file: