Optika GUI Toolik Version of the Day
Public Types | Public Member Functions | Private Member Functions | Private Attributes
Optika::RangeValidatorDependency< S > Class Template Reference

#include <Optika_StandardDependencies.hpp>

Inheritance diagram for Optika::RangeValidatorDependency< S >:
Inheritance 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 ()

Private Member Functions

void validateDep ()

Private Attributes

Teuchos::RCP< const
Teuchos::ParameterEntryValidator
defaultValidator
RangeToValidatorMap rangesAndValidators

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:

Definition at line 1049 of file Optika_StandardDependencies.hpp.


Member Typedef Documentation

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

Convenience typedef

Definition at line 1054 of file Optika_StandardDependencies.hpp.

Definition at line 1055 of file Optika_StandardDependencies.hpp.


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:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentNameThe name of the dependent parameter.
dependentParentListThe ParameterList containing the dependent.
rangesAndValidatorsA 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.
defaultValidatorIf 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.

Definition at line 1069 of file Optika_StandardDependencies.hpp.

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:
dependeeNameThe name of the dependee parameter.
dependentNameThe name of the dependent parameter.
parentListThe ParameterList containing the dependent and the dependee.
rangesAndValidatorsA 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.
defaultValidatorIf 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.

Definition at line 1090 of file Optika_StandardDependencies.hpp.

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:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentsA map containing dependent Parameters associated with their paraent ParameterLists.
rangesAndValidatorsA 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.
defaultValidatorIf 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.

Definition at line 1111 of file Optika_StandardDependencies.hpp.


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.

Definition at line 1121 of file Optika_StandardDependencies.hpp.

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

Validates the dependency to make sure it's valid/has been setup properly. If subclassing, this fucntion should be called in the new subclasses constructor.

Implements Optika::ValidatorDependency.

Definition at line 1150 of file Optika_StandardDependencies.hpp.


Member Data Documentation

The default validator

Definition at line 1143 of file Optika_StandardDependencies.hpp.

A map associating ranges with validators.

Definition at line 1148 of file Optika_StandardDependencies.hpp.


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