NOX Development
Public Member Functions | Protected Member Functions | Protected Attributes
LOCA::Parameter::Library Class Reference

Class to provide a centralized library for setting/retrieving numerical parameter values in application codes. More...

#include <LOCA_Parameter_Library.H>

List of all members.

Public Member Functions

 Library ()
 Default constructor.
 ~Library ()
 Destructor.
template<class ValueType >
void setValue (const std::string &name, const ValueType &value)
 Set parameter given by name to value value.
template<class ValueType >
ValueType getValue (const std::string &name) const
 Get parameter given by name.
template<class ObjectType , class ValueType >
bool addParameterEntry (const std::string &name, ObjectType &object, ValueType ObjectType::*object_val_ptr)
 Add a new parameter to library using the default setting mechanism.
template<class FunctorType , class ValueType >
bool addParameterEntry (const std::string &name, FunctorType *fctr)
 Add a new parameter to library using functor setting mechanism.
template<class ValueType >
bool addParameterEntry (const std::string &name, Entry< ValueType > *entry)
 Add a new parameter using custom entry.

Protected Member Functions

 Library (const Library &l)
 Copy constructor.
Libraryoperator= (const Library &l)
 Assignment operator.
ParameterMapIterator getEntryMapIterator (const std::string &name)
 Finds the set of entries corresponding to parameter name and sets the iterator it to point to it.
ParameterMapConstIterator getEntryMapIterator (const std::string &name) const
 Finds the set of entries corresponding to parameter name and sets the iterator it to point to it.
ValueTypeMapIterator getEntryIterator (const std::string &valueTypeString, const ParameterMapIterator &paramIterator)
 Finds the entry corresponding to entry valueTypeString for parameter corresponding to paramIterator and sets the iterator valueIterator to point to it. Returns false if there is no entry for type given by valueTypeString.
ValueTypeMapConstIterator getEntryIterator (const std::string &valueTypeString, const ParameterMapConstIterator &paramIterator) const
 Finds the entry corresponding to entry valueTypeString for parameter corresponding to paramIterator and sets the iterator valueIterator to point to it. Returns false if there is no entry for type given by valueTypeString.
template<class ValueType >
Entry< ValueType > & getEntry (const std::string &name)
 Gets the entry corresponding to parameter name name and type ValueType.
template<class ValueType >
const Entry< ValueType > & getEntry (const std::string &name) const
 Gets the entry corresponding to parameter name name and type ValueType.
template<class ValueType >
std::string getTypeName () const
 Returns a std::string representation of type ValueType.

Protected Attributes

ParameterMap library
 Library of Entries.

Detailed Description

Class to provide a centralized library for setting/retrieving numerical parameter values in application codes.

This class provides a mechanism for setting and retrieving arbitrary numerical parameter values throughout an application code. Parameters can be material properties, coefficients in source functions, etc. The purpose of this class is to allow external libraries to set and retrieve parameters values to perform, for example, numerical continuation and optimization.

This class in currently under development and is far from complete.


Member Function Documentation

template<class ObjectType , class ValueType >
bool LOCA::Parameter::Library::addParameterEntry ( const std::string &  name,
ObjectType &  object,
ValueType ObjectType::*  object_val_ptr 
)

Add a new parameter to library using the default setting mechanism.

Returns true if successful in adding entry to library, false otherwise.

template<class FunctorType , class ValueType >
bool LOCA::Parameter::Library::addParameterEntry ( const std::string &  name,
FunctorType *  fctr 
)

Add a new parameter to library using functor setting mechanism.

Returns true if successful in adding entry to library, false otherwise.

template<class ValueType >
bool LOCA::Parameter::Library::addParameterEntry ( const std::string &  name,
Entry< ValueType > *  entry 
)

Add a new parameter using custom entry.

Returns true if successful in adding entry to library, false otherwise.

References LOCA::Parameter::Entry< ValueType >::setIsInLibrary().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends