libMesh::ParameterProxy< T > Class Template Reference

#include <parameter_accessor.h>

Public Member Functions

 ParameterProxy (ParameterAccessor< T > &accessor)
 
ParameterProxyoperator= (const T &new_value)
 
ParameterProxyoperator= (const ParameterProxy< T > &new_value)
 
ParameterProxyoperator= (const ConstParameterProxy< T > &new_value)
 
ParameterProxyoperator+= (const T &value_increment)
 
ParameterProxyoperator-= (const T &value_decrement)
 
ParameterProxyoperator*= (const T &value_multiplier)
 
ParameterProxyoperator/= (const T &value_divisor)
 
 operator T () const
 

Private Attributes

ParameterAccessor< T > & _accessor
 

Detailed Description

template<typename T = Number>
class libMesh::ParameterProxy< T >

Definition at line 34 of file parameter_accessor.h.

Constructor & Destructor Documentation

template<typename T = Number>
libMesh::ParameterProxy< T >::ParameterProxy ( ParameterAccessor< T > &  accessor)
inline

Constructor: which parameter are we a proxy for?

Definition at line 105 of file parameter_accessor.h.

106  : _accessor(accessor) {}
ParameterAccessor< T > & _accessor

Member Function Documentation

template<typename T = Number>
libMesh::ParameterProxy< T >::operator T ( ) const
inline

Getter: get the value of the parameter we access.

Definition at line 146 of file parameter_accessor.h.

146 { return _accessor.get(); }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator*= ( const T &  value_multiplier)
inline

Setter: change the value of the parameter we access.

Definition at line 136 of file parameter_accessor.h.

136 { _accessor.set(_accessor.get() * value_multiplier); return *this; }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator+= ( const T &  value_increment)
inline

Setter: change the value of the parameter we access.

Definition at line 126 of file parameter_accessor.h.

126 { _accessor.set(_accessor.get() + value_increment); return *this; }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator-= ( const T &  value_decrement)
inline

Setter: change the value of the parameter we access.

Definition at line 131 of file parameter_accessor.h.

131 { _accessor.set(_accessor.get() - value_decrement); return *this; }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator/= ( const T &  value_divisor)
inline

Setter: change the value of the parameter we access.

Definition at line 141 of file parameter_accessor.h.

141 { _accessor.set(_accessor.get() / value_divisor); return *this; }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator= ( const T &  new_value)
inline

Setter: change the value of the parameter we access.

Definition at line 111 of file parameter_accessor.h.

111 { _accessor.set(new_value); return *this; }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator= ( const ParameterProxy< T > &  new_value)
inline

Setter: change the value of the parameter we access.

Definition at line 116 of file parameter_accessor.h.

116 { _accessor.set(new_value.get()); }
ParameterAccessor< T > & _accessor
template<typename T = Number>
ParameterProxy& libMesh::ParameterProxy< T >::operator= ( const ConstParameterProxy< T > &  new_value)
inline

Setter: change the value of the parameter we access.

Definition at line 121 of file parameter_accessor.h.

References libMesh::ConstParameterProxy< T >::get().

121 { _accessor.set(new_value.get()); return *this; }
ParameterAccessor< T > & _accessor

Member Data Documentation

template<typename T = Number>
ParameterAccessor<T>& libMesh::ParameterProxy< T >::_accessor
private

Definition at line 149 of file parameter_accessor.h.


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