Optika::RangeValidatorDependency< S > Class Template Reference

#include <Optika_StandardDependencies.hpp>

Inheritance diagram for Optika::RangeValidatorDependency< S >:
Inheritance graph
[legend]
Collaboration diagram for Optika::RangeValidatorDependency< S >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair< S, S > Range
typedef std::map< Range,
Teuchos::RCP< const
Teuchos::ParameterEntryValidator > > 
RangeToValidatorMap

Public Member Functions

 RangeValidatorDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > dependentParentList, RangeToValidatorMap rangesAndValidators, Teuchos::RCP< Teuchos::ParameterEntryValidator > defaultValidator)
 RangeValidatorDependency (std::string dependeeName, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > parentList, RangeToValidatorMap rangesAndValidators, Teuchos::RCP< Teuchos::ParameterEntryValidator > defaultValidator)
 RangeValidatorDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, ParameterParentMap dependents, RangeToValidatorMap rangesAndValidators, Teuchos::RCP< Teuchos::ParameterEntryValidator > defaultValidator)
void evaluate ()

Detailed Description

template<class S>
class Optika::RangeValidatorDependency< S >

A RangeValidatorDependency says the following about the relationship between two parameters: Dependening on the value of the dependee, the dependent should use a particular validator from a given set of validators.

A RangeValidatorDependency achieves this by associating ranges of numerical values with validators. If the dependees value falls within the one of the ranges, the validator associated with the range is used on the dependent. All ranges are inclusive.

A RangeValidatorDependency must have the following characterisitics:


Member Typedef Documentation

template<class S >
typedef std::pair<S,S> Optika::RangeValidatorDependency< S >::Range

Convenience typedef


Constructor & Destructor Documentation

template<class S >
Optika::RangeValidatorDependency< S >::RangeValidatorDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList >  dependeeParentList,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList >  dependentParentList,
RangeToValidatorMap  rangesAndValidators,
Teuchos::RCP< Teuchos::ParameterEntryValidator >  defaultValidator 
) [inline]

Constructs a RangeValidatorDependency.

Parameters:
dependeeName The name of the dependee parameter.
dependeeParentList The ParameterList containing the dependee.
dependentName The name of the dependent parameter.
dependentParentList The ParameterList containing the dependent.
rangesAndValidators A map associating ranges of values with ParameterEntryValidators. This will be used to deteremine what type of validator should be applied to the dependent based on the dependees value.
defaultValidator If a value is entered in the dependee that does not fall within any of the ranges in the rangesAndValidators map, this is the validator that will be assigned to the dependent.
template<class S >
Optika::RangeValidatorDependency< S >::RangeValidatorDependency ( std::string  dependeeName,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList >  parentList,
RangeToValidatorMap  rangesAndValidators,
Teuchos::RCP< Teuchos::ParameterEntryValidator >  defaultValidator 
) [inline]

Constructs a RangeValidatorDependency.

Parameters:
dependeeName The name of the dependee parameter.
dependentName The name of the dependent parameter.
parentList The ParameterList containing the dependent and the dependee.
rangesAndValidators A map associating ranges of values with ParameterEntryValidators. This will be used to deteremine what type of validator should be applied to the dependent based on the dependees value.
defaultValidator If a value is entered in the dependee that does not fall within any of the ranges in the rangesAndValidators map, this is the validator that will be assigned to the dependent.
template<class S >
Optika::RangeValidatorDependency< S >::RangeValidatorDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList >  dependeeParentList,
ParameterParentMap  dependents,
RangeToValidatorMap  rangesAndValidators,
Teuchos::RCP< Teuchos::ParameterEntryValidator >  defaultValidator 
) [inline]

Constructs a RangeValidatorDependency.

Parameters:
dependeeName The name of the dependee parameter.
dependeeParentList The ParameterList containing the dependee.
dependents A map containing dependent Parameters associated with their paraent ParameterLists.
rangesAndValidators A map associating ranges of values with ParameterEntryValidators. This will be used to deteremine what type of validator should be applied to the dependent based on the dependees value.
defaultValidator If a value is entered in the dependee that does not fall within any of the ranges in the rangesAndValidators map, this is the validator that will be assigned to the dependent.

Member Function Documentation

template<class S >
void Optika::RangeValidatorDependency< S >::evaluate (  )  [inline, virtual]

Evaluates the dependency and makes any appropriate changes to the dependee based on the dependent.

Implements Optika::ValidatorDependency.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations
Generated on Wed Apr 13 10:05:55 2011 for Optika by  doxygen 1.6.3