musica (C++)
Loading...
Searching...
No Matches
constitutive::CachedVariable< T > Struct Template Referenceabstract

#include <cachedvariable.hpp>

Inheritance diagram for constitutive::CachedVariable< T >:

Public Member Functions

 CachedVariable ()=default
 Default constructor.
 CachedVariable (const CachedVariable &other)
 Copy constructor.
virtual ~CachedVariable ()=default
 Destructor.
bool empty () const
 Whether the state variable is empty.
virtual void initialize ()=0
 Initialize the cached value.
void set (const T &new_value)
 Set the cached value.
const T & value () const
 Get the value (const).
T & value ()
 Get the value (non-const).

Public Attributes

bool cached = false
 whether the state variable has been cached
std::shared_ptr< T > value_ = nullptr
 cached value

Constructor & Destructor Documentation

◆ CachedVariable() [1/2]

template<typename T>
constitutive::CachedVariable< T >::CachedVariable ( )
default

Default constructor.

Referenced by CachedVariable().

Here is the caller graph for this function:

◆ CachedVariable() [2/2]

template<typename T>
constitutive::CachedVariable< T >::CachedVariable ( const CachedVariable< T > & other)
inline

Copy constructor.

References CachedVariable().

Here is the call graph for this function:

◆ ~CachedVariable()

template<typename T>
virtual constitutive::CachedVariable< T >::~CachedVariable ( )
virtualdefault

Destructor.

Member Function Documentation

◆ empty()

template<typename T>
bool constitutive::CachedVariable< T >::empty ( ) const
inline

Whether the state variable is empty.

Referenced by constitutive::CachedScalar< T >::initialize().

Here is the caller graph for this function:

◆ initialize()

template<typename T>
virtual void constitutive::CachedVariable< T >::initialize ( )
pure virtual

◆ set()

template<typename T>
void constitutive::CachedVariable< T >::set ( const T & new_value)
inline

Set the cached value.

Parameters
new_valuecached value

Referenced by constitutive::CachedScalar< T >::initialize().

Here is the caller graph for this function:

◆ value() [1/2]

template<typename T>
T & constitutive::CachedVariable< T >::value ( )
inline

Get the value (non-const).

◆ value() [2/2]

Member Data Documentation

◆ cached

◆ value_

template<typename T>
std::shared_ptr<T> constitutive::CachedVariable< T >::value_ = nullptr

cached value


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