$extrastylesheet
#include <parameter_pointer.h>

Public Member Functions | |
| ParameterPointer (T *param_ptr) | |
| virtual void | set (const T &new_value) |
| virtual const T & | get () const |
| virtual void | operator= (T *new_ptr) |
| ParameterProxy< T > | operator* () |
| ConstParameterProxy< T > | operator* () const |
Private Attributes | |
| T * | _ptr |
Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation.
This is the "default" ParameterAccessor subclass: it simply stores a user-provided pointer to the parameter, and modifies the value at that location in memory.
Definition at line 40 of file parameter_pointer.h.
| libMesh::ParameterPointer< T >::ParameterPointer | ( | T * | param_ptr | ) | [inline] |
Constructor: take the raw pointer to the parameter
Definition at line 46 of file parameter_pointer.h.
: _ptr(param_ptr) {}
| virtual const T& libMesh::ParameterPointer< T >::get | ( | ) | const [inline, virtual] |
Getter: get the value of the parameter we access.
Implements libMesh::ParameterAccessor< T >.
Definition at line 55 of file parameter_pointer.h.
References libMesh::ParameterPointer< T >::_ptr, and libMesh::libmesh_assert().
{ libmesh_assert(_ptr); return *_ptr; }
| ParameterProxy<T> libMesh::ParameterAccessor< T >::operator* | ( | ) | [inline, inherited] |
Proxy: for backward compatibility, we allow codes to treat a ParameterAccessor as if it were a simple pointer-to-value. We can't safely allow "Number *n = parameter_vector[p]" to compile, but we can allow "*parameter_vector[p] += deltap" to work.
Definition at line 80 of file parameter_accessor.h.
{ return ParameterProxy<T>(*this); }
| ConstParameterProxy<T> libMesh::ParameterAccessor< T >::operator* | ( | ) | const [inline, inherited] |
Definition at line 82 of file parameter_accessor.h.
{ return ConstParameterProxy<T>(*this); }
| virtual void libMesh::ParameterPointer< T >::operator= | ( | T * | new_ptr | ) | [inline, virtual] |
Reseater: change the location of the parameter we access. This is included for backward compatibility, but is deprecated.
Reimplemented from libMesh::ParameterAccessor< T >.
Definition at line 61 of file parameter_pointer.h.
References libMesh::ParameterPointer< T >::_ptr.
{ libmesh_deprecated(); _ptr = new_ptr; }
| virtual void libMesh::ParameterPointer< T >::set | ( | const T & | new_value | ) | [inline, virtual] |
Setter: change the value of the parameter we access.
Implements libMesh::ParameterAccessor< T >.
Definition at line 50 of file parameter_pointer.h.
References libMesh::ParameterPointer< T >::_ptr, and libMesh::libmesh_assert().
{ libmesh_assert(_ptr); *_ptr = new_value; }
T* libMesh::ParameterPointer< T >::_ptr [private] |
Definition at line 64 of file parameter_pointer.h.
Referenced by libMesh::ParameterPointer< T >::get(), libMesh::ParameterPointer< T >::operator=(), and libMesh::ParameterPointer< T >::set().