#include <LOCA_Parameter_Entry.H>
Public Member Functions | |
StandardEntry (FunctorType *fctr) | |
Constructor. | |
virtual | ~StandardEntry () |
Destructor. | |
virtual void | setValue (const ValueType &value) |
Set parameter this object represents to value. | |
virtual ValueType | getValue () const |
Get parameter value this object represents. | |
virtual void | setIsInLibrary () |
Informs entry that it is now stored in the library. | |
Protected Attributes | |
bool | deleteFctr |
Flag indicating whether to delete function object in destructor. | |
FunctorType * | func |
Stores pointer to function object. | |
Private Member Functions | |
StandardEntry (const StandardEntry &) | |
Private to prohibit copying. | |
StandardEntry & | operator= (const StandardEntry &) |
Private to prohibit copying. |
This is the standard parameter entry class that uses a function object to actually set/retrieve parameter values. The nice thing about using a function object is it allows one to set parameters that don't actually exist in the code, for example, setting a dimensionless group value by modifiying a number of physical parameters. By supplying an appropriate function object, this class should suffice for setting/retrieving parameter values in nearly all cases.
The constructor takes a pointer to the supplied function object. It is assumed that this class then owns that pointer, and in particular, calls delete in the destructor if the entry is successfully added to the library. It does not delete the function object otherwise.
Definition at line 112 of file LOCA_Parameter_Entry.H.
LOCA::Parameter::StandardEntry< FunctorType, ValueType >::StandardEntry | ( | FunctorType * | fctr | ) | [inline] |
virtual LOCA::Parameter::StandardEntry< FunctorType, ValueType >::~StandardEntry | ( | ) | [inline, virtual] |
Destructor.
Definition at line 121 of file LOCA_Parameter_Entry.H.
References LOCA::Parameter::StandardEntry< FunctorType, ValueType >::deleteFctr, and LOCA::Parameter::StandardEntry< FunctorType, ValueType >::func.
LOCA::Parameter::StandardEntry< FunctorType, ValueType >::StandardEntry | ( | const StandardEntry< FunctorType, ValueType > & | ) | [private] |
Private to prohibit copying.
virtual void LOCA::Parameter::StandardEntry< FunctorType, ValueType >::setValue | ( | const ValueType & | value | ) | [inline, virtual] |
Set parameter this object represents to value.
Implements LOCA::Parameter::Entry< ValueType >.
Definition at line 124 of file LOCA_Parameter_Entry.H.
References LOCA::Parameter::StandardEntry< FunctorType, ValueType >::func.
virtual ValueType LOCA::Parameter::StandardEntry< FunctorType, ValueType >::getValue | ( | ) | const [inline, virtual] |
Get parameter value this object represents.
Implements LOCA::Parameter::Entry< ValueType >.
Definition at line 127 of file LOCA_Parameter_Entry.H.
References LOCA::Parameter::StandardEntry< FunctorType, ValueType >::func.
virtual void LOCA::Parameter::StandardEntry< FunctorType, ValueType >::setIsInLibrary | ( | ) | [inline, virtual] |
Informs entry that it is now stored in the library.
This is used primarily for informing the entry on how to delete itself when deleting the library.
Implements LOCA::Parameter::Entry< ValueType >.
Definition at line 134 of file LOCA_Parameter_Entry.H.
References LOCA::Parameter::StandardEntry< FunctorType, ValueType >::deleteFctr.
StandardEntry& LOCA::Parameter::StandardEntry< FunctorType, ValueType >::operator= | ( | const StandardEntry< FunctorType, ValueType > & | ) | [private] |
Private to prohibit copying.
bool LOCA::Parameter::StandardEntry< FunctorType, ValueType >::deleteFctr [protected] |
Flag indicating whether to delete function object in destructor.
Definition at line 147 of file LOCA_Parameter_Entry.H.
Referenced by LOCA::Parameter::StandardEntry< FunctorType, ValueType >::setIsInLibrary(), and LOCA::Parameter::StandardEntry< FunctorType, ValueType >::~StandardEntry().
FunctorType* LOCA::Parameter::StandardEntry< FunctorType, ValueType >::func [protected] |
Stores pointer to function object.
Definition at line 150 of file LOCA_Parameter_Entry.H.
Referenced by LOCA::Parameter::StandardEntry< FunctorType, ValueType >::getValue(), LOCA::Parameter::StandardEntry< FunctorType, ValueType >::setValue(), and LOCA::Parameter::StandardEntry< FunctorType, ValueType >::~StandardEntry().