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>

Collaboration diagram for LOCA::Parameter::Library:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Library ()
 Default constructor.
 ~Library ()
 Destructor.
template<class ValueType >
void setValue (const string &name, const ValueType &value)
 Set parameter given by name to value value.
template<class ValueType >
ValueType getValue (const string &name) const
 Get parameter given by name.
template<class ObjectType , class ValueType >
bool addParameterEntry (const 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 string &name, FunctorType *fctr)
 Add a new parameter to library using functor setting mechanism.
template<class ValueType >
bool addParameterEntry (const 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 string &name)
 Finds the set of entries corresponding to parameter name and sets the iterator it to point to it.
ParameterMapConstIterator getEntryMapIterator (const string &name) const
 Finds the set of entries corresponding to parameter name and sets the iterator it to point to it.
ValueTypeMapIterator getEntryIterator (const 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 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 string &name)
 Gets the entry corresponding to parameter name name and type ValueType.
template<class ValueType >
const Entry< ValueType > & getEntry (const string &name) const
 Gets the entry corresponding to parameter name name and type ValueType.
template<class ValueType >
string getTypeName () const
 Returns a string representation of type ValueType.

Protected Attributes

ParameterMap library
 Library of Entries.

Private Types

typedef map< string,
AbstractEntry * > 
ValueTypeMap
 Map of entries for a parameter name.
typedef
ValueTypeMap::const_iterator 
ValueTypeMapConstIterator
 Const iterator for ValueTypeMap.
typedef ValueTypeMap::iterator ValueTypeMapIterator
 Iterator for ValueTypeMap.
typedef map< string,
ValueTypeMap * > 
ParameterMap
 Map of maps for all parameter names.
typedef
ParameterMap::const_iterator 
ParameterMapConstIterator
 Const iterator for ParameterMap.
typedef ParameterMap::iterator ParameterMapIterator
 Iterator for ParameterMap.


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.

Definition at line 76 of file LOCA_Parameter_Library.H.


Member Typedef Documentation

typedef map<string, AbstractEntry*> LOCA::Parameter::Library::ValueTypeMap [private]

Map of entries for a parameter name.

Definition at line 79 of file LOCA_Parameter_Library.H.

typedef ValueTypeMap::const_iterator LOCA::Parameter::Library::ValueTypeMapConstIterator [private]

Const iterator for ValueTypeMap.

Definition at line 82 of file LOCA_Parameter_Library.H.

typedef ValueTypeMap::iterator LOCA::Parameter::Library::ValueTypeMapIterator [private]

Iterator for ValueTypeMap.

Definition at line 85 of file LOCA_Parameter_Library.H.

typedef map<string, ValueTypeMap*> LOCA::Parameter::Library::ParameterMap [private]

Map of maps for all parameter names.

Definition at line 88 of file LOCA_Parameter_Library.H.

typedef ParameterMap::const_iterator LOCA::Parameter::Library::ParameterMapConstIterator [private]

Const iterator for ParameterMap.

Definition at line 91 of file LOCA_Parameter_Library.H.

typedef ParameterMap::iterator LOCA::Parameter::Library::ParameterMapIterator [private]

Iterator for ParameterMap.

Definition at line 94 of file LOCA_Parameter_Library.H.


Constructor & Destructor Documentation

LOCA::Parameter::Library::Library (  )  [inline]

Default constructor.

Definition at line 99 of file LOCA_Parameter_Library.H.

LOCA::Parameter::Library::~Library (  ) 

Destructor.

Definition at line 45 of file LOCA_Parameter_Library.C.

References library.

LOCA::Parameter::Library::Library ( const Library l  )  [protected]

Copy constructor.

Definition at line 68 of file LOCA_Parameter_Library.C.


Member Function Documentation

template<class ValueType >
void LOCA::Parameter::Library::setValue ( const string &  name,
const ValueType &  value 
) [inline]

Set parameter given by name to value value.

Definition at line 50 of file LOCA_Parameter_LibraryT.H.

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

template<class ValueType >
ValueType LOCA::Parameter::Library::getValue ( const string &  name  )  const [inline]

Get parameter given by name.

Definition at line 61 of file LOCA_Parameter_LibraryT.H.

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

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

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

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

Definition at line 72 of file LOCA_Parameter_LibraryT.H.

Referenced by addParameterEntry().

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

Add a new parameter to library using functor setting mechanism.

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

Definition at line 100 of file LOCA_Parameter_LibraryT.H.

References addParameterEntry().

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

Add a new parameter using custom entry.

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

Definition at line 119 of file LOCA_Parameter_LibraryT.H.

References getEntryIterator(), getEntryMapIterator(), library, and LOCA::Parameter::Entry< ValueType >::setIsInLibrary().

LOCA::Parameter::Library & LOCA::Parameter::Library::operator= ( const Library l  )  [protected]

Assignment operator.

Definition at line 72 of file LOCA_Parameter_Library.C.

References library.

LOCA::Parameter::Library::ParameterMapIterator LOCA::Parameter::Library::getEntryMapIterator ( const string &  name  )  [protected]

Finds the set of entries corresponding to parameter name and sets the iterator it to point to it.

Definition at line 78 of file LOCA_Parameter_Library.C.

References library.

Referenced by addParameterEntry(), and getEntry().

LOCA::Parameter::Library::ParameterMapConstIterator LOCA::Parameter::Library::getEntryMapIterator ( const string &  name  )  const [protected]

Finds the set of entries corresponding to parameter name and sets the iterator it to point to it.

Definition at line 83 of file LOCA_Parameter_Library.C.

References library.

LOCA::Parameter::Library::ValueTypeMapIterator LOCA::Parameter::Library::getEntryIterator ( const string &  valueTypeString,
const ParameterMapIterator paramIterator 
) [protected]

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.

Definition at line 88 of file LOCA_Parameter_Library.C.

Referenced by addParameterEntry(), and getEntry().

LOCA::Parameter::Library::ValueTypeMapConstIterator LOCA::Parameter::Library::getEntryIterator ( const string &  valueTypeString,
const ParameterMapConstIterator paramIterator 
) const [protected]

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.

Definition at line 95 of file LOCA_Parameter_Library.C.

template<class ValueType >
LOCA::Parameter::Entry< ValueType > & LOCA::Parameter::Library::getEntry ( const string &  name  )  [inline, protected]

Gets the entry corresponding to parameter name name and type ValueType.

Definition at line 166 of file LOCA_Parameter_LibraryT.H.

References getEntryIterator(), getEntryMapIterator(), and library.

template<class ValueType >
const LOCA::Parameter::Entry< ValueType > & LOCA::Parameter::Library::getEntry ( const string &  name  )  const [inline, protected]

Gets the entry corresponding to parameter name name and type ValueType.

Definition at line 202 of file LOCA_Parameter_LibraryT.H.

References getEntryIterator(), getEntryMapIterator(), and library.

template<class ValueType >
string LOCA::Parameter::Library::getTypeName (  )  const [inline, protected]

Returns a string representation of type ValueType.

Definition at line 160 of file LOCA_Parameter_LibraryT.H.


Member Data Documentation

Library of Entries.

Definition at line 201 of file LOCA_Parameter_Library.H.

Referenced by addParameterEntry(), getEntry(), getEntryMapIterator(), operator=(), and ~Library().


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

Generated on Thu Dec 17 11:02:58 2009 for Nonlinear Solver Project by  doxygen 1.5.9