https://mooseframework.inl.gov
Public Member Functions | Protected Attributes | List of all members
OptionalMaterialPropertyProxyBase< M > Class Template Referenceabstract

Helper class for deferred getting of material properties after the construction phase for materials. More...

#include <MaterialPropertyInterface.h>

Inheritance diagram for OptionalMaterialPropertyProxyBase< M >:
[legend]

Public Member Functions

 OptionalMaterialPropertyProxyBase (const std::string &name, const unsigned int state)
 
virtual ~OptionalMaterialPropertyProxyBase ()
 
virtual void resolve (M &material)=0
 

Protected Attributes

const std::string _name
 
const unsigned int _state
 

Detailed Description

template<class M>
class OptionalMaterialPropertyProxyBase< M >

Helper class for deferred getting of material properties after the construction phase for materials.

This enables "optional material properties" in materials. It works by returning a reference to a pointer to a material property (rather than a reference to the property value). The pointer will be set to point to either an existing material property or to nullptr if the requested property does not exist.

Definition at line 40 of file MaterialPropertyInterface.h.

Constructor & Destructor Documentation

◆ OptionalMaterialPropertyProxyBase()

template<class M>
OptionalMaterialPropertyProxyBase< M >::OptionalMaterialPropertyProxyBase ( const std::string &  name,
const unsigned int  state 
)
inline

Definition at line 43 of file MaterialPropertyInterface.h.

44  : _name(name), _state(state)
45  {
46  }

◆ ~OptionalMaterialPropertyProxyBase()

template<class M>
virtual OptionalMaterialPropertyProxyBase< M >::~OptionalMaterialPropertyProxyBase ( )
inlinevirtual

Definition at line 47 of file MaterialPropertyInterface.h.

47 {}

Member Function Documentation

◆ resolve()

template<class M>
virtual void OptionalMaterialPropertyProxyBase< M >::resolve ( M &  material)
pure virtual

Member Data Documentation

◆ _name

template<class M>
const std::string OptionalMaterialPropertyProxyBase< M >::_name
protected

Definition at line 51 of file MaterialPropertyInterface.h.

◆ _state

template<class M>
const unsigned int OptionalMaterialPropertyProxyBase< M >::_state
protected

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