NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
LOCA::Parameter::StandardEntry< FunctorType, ValueType > Class Template Reference

Standard parameter entry class using a function object. More...

#include <LOCA_Parameter_Entry.H>

Inheritance diagram for LOCA::Parameter::StandardEntry< FunctorType, ValueType >:
Inheritance graph
[legend]
Collaboration diagram for LOCA::Parameter::StandardEntry< FunctorType, ValueType >:
Collaboration graph
[legend]

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. More...
 
- Public Member Functions inherited from LOCA::Parameter::Entry< ValueType >
 Entry ()
 Default constructor.
 
virtual ~Entry ()
 Destructor.
 
- Public Member Functions inherited from LOCA::Parameter::AbstractEntry
 AbstractEntry ()
 Default contructor.
 
virtual ~AbstractEntry ()
 Destructor.
 

Protected Attributes

bool deleteFctr
 Flag indicating whether to delete function object in destructor.
 
FunctorType * func
 Stores pointer to function object.
 

Detailed Description

template<class FunctorType, class ValueType>
class LOCA::Parameter::StandardEntry< FunctorType, ValueType >

Standard parameter entry class using a function object.

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.

Member Function Documentation

template<class FunctorType, class ValueType>
virtual void LOCA::Parameter::StandardEntry< FunctorType, ValueType >::setIsInLibrary ( )
inlinevirtual

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 >.

References LOCA::Parameter::StandardEntry< FunctorType, ValueType >::deleteFctr.


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