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

#include <Optika_StandardDependencies.hpp>

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

List of all members.

Public Types

enum  ValidatorAspect { Min, Max, Step }

Public Member Functions

 NumberValidatorAspectDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > dependentParentList, Teuchos::RCP< Optika::EnhancedNumberValidator< S > > validator, ValidatorAspect aspect, S(*func)(S)=0)
 NumberValidatorAspectDependency (std::string dependeeName, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > parentList, Teuchos::RCP< Optika::EnhancedNumberValidator< S > > validator, ValidatorAspect aspect, S(*func)(S)=0)
 NumberValidatorAspectDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > dependentParentList, Teuchos::RCP< Optika::ArrayNumberValidator< S > > validator, ValidatorAspect aspect, S(*func)(S)=0)
 NumberValidatorAspectDependency (std::string dependeeName, std::string dependentName, Teuchos::RCP< Teuchos::ParameterList > parentList, Teuchos::RCP< Optika::ArrayNumberValidator< S > > validator, ValidatorAspect aspect, S(*func)(S)=0)
 NumberValidatorAspectDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, ParameterParentMap dependents, Teuchos::RCP< Optika::EnhancedNumberValidator< S > > validator, ValidatorAspect aspect, S(*func)(S)=0)
 NumberValidatorAspectDependency (std::string dependeeName, Teuchos::RCP< Teuchos::ParameterList > dependeeParentList, ParameterParentMap dependents, Teuchos::RCP< Optika::ArrayNumberValidator< S > > validator, ValidatorAspect aspect, S(*func)(S)=0)
void evaluate ()

Private Member Functions

runFunction (S argument) const
void validateDep ()

Private Attributes

ValidatorAspect aspect
Teuchos::RCP
< Optika::EnhancedNumberValidator
< S > > 
validator
S(* func )(S)

Detailed Description

template<class S>
class Optika::NumberValidatorAspectDependency< S >

A NumberValidatorAspectDependency says the following about the relationship between two parameters in a dependent parameter list: depending of the value of the dependee a particular aspect of the dependents validator will have a certain value.

A NumberValidatorAspectDependency must have the following characteristics:

Definition at line 534 of file Optika_StandardDependencies.hpp.


Member Enumeration Documentation

An enum specifying the aspect of the validator that should be modified

Enumerator:
Min 
Max 
Step 

Definition at line 540 of file Optika_StandardDependencies.hpp.


Constructor & Destructor Documentation

template<class S >
Optika::NumberValidatorAspectDependency< S >::NumberValidatorAspectDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList dependentParentList,
Teuchos::RCP< Optika::EnhancedNumberValidator< S > >  validator,
ValidatorAspect  aspect,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberValidatorDependency

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentNameThe name of the dependent parameter.
dependentParentListThe ParameterList containing the dependent.
validatorThe validator whose aspect will change.
aspectThe aspect of the validator that should change.
funcA function specifying how the value of the validators aspect should be calculated from the dependees value.

Definition at line 558 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberValidatorAspectDependency< S >::NumberValidatorAspectDependency ( std::string  dependeeName,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList parentList,
Teuchos::RCP< Optika::EnhancedNumberValidator< S > >  validator,
ValidatorAspect  aspect,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberValidatorDependency

Parameters:
dependeeNameThe name of the dependee parameter.
dependentNameThe name of the dependent parameter.
parentListThe ParameterList containing the dependent and the dependee.
validatorThe validator whose aspect will change.
aspectThe aspect of the validator that should change.
funcA function specifying how the value of the validators aspect should be calculated from the dependees value.

Definition at line 582 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberValidatorAspectDependency< S >::NumberValidatorAspectDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList dependentParentList,
Teuchos::RCP< Optika::ArrayNumberValidator< S > >  validator,
ValidatorAspect  aspect,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberValidatorDependency. Conveniece Constructor for ArrayNumberValidators

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentNameThe name of the dependent parameter.
dependentParentListThe ParameterList containing the dependent.
validatorThe validator whose aspect will change.
aspectThe aspect of the validator that should change.
funcA function specifying how the value of the validators aspect should be calculated from the dependees value.

Definition at line 600 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberValidatorAspectDependency< S >::NumberValidatorAspectDependency ( std::string  dependeeName,
std::string  dependentName,
Teuchos::RCP< Teuchos::ParameterList parentList,
Teuchos::RCP< Optika::ArrayNumberValidator< S > >  validator,
ValidatorAspect  aspect,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberValidatorDependency. Conveniece Constructor for ArrayNumberValidators

Parameters:
dependeeNameThe name of the dependee parameter.
dependentNameThe name of the dependent parameter.
parentListThe ParameterList containing the dependent and the dependee.
validatorThe validator whose aspect will change.
aspectThe aspect of the validator that should change.
funcA function specifying how the value of the validators aspect should be calculated from the dependees value.

Definition at line 623 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberValidatorAspectDependency< S >::NumberValidatorAspectDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
ParameterParentMap  dependents,
Teuchos::RCP< Optika::EnhancedNumberValidator< S > >  validator,
ValidatorAspect  aspect,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberValidatorDependency

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentsA map containing dependent Parameters associated with their paraent ParameterLists.
validatorThe validator whose aspect will change.
aspectThe aspect of the validator that should change.
funcA function specifying how the value of the validators aspect should be calculated from the dependees value.

Definition at line 647 of file Optika_StandardDependencies.hpp.

template<class S >
Optika::NumberValidatorAspectDependency< S >::NumberValidatorAspectDependency ( std::string  dependeeName,
Teuchos::RCP< Teuchos::ParameterList dependeeParentList,
ParameterParentMap  dependents,
Teuchos::RCP< Optika::ArrayNumberValidator< S > >  validator,
ValidatorAspect  aspect,
S(*)(S)  func = 0 
) [inline]

Constructs a NumberValidatorDependency. Conveniece Constructor for ArrayNumberValidators

Parameters:
dependeeNameThe name of the dependee parameter.
dependeeParentListThe ParameterList containing the dependee.
dependentsA map containing dependent Parameters associated with their paraent ParameterLists.
validatorThe validator whose aspect will change.
aspectThe aspect of the validator that should change.
funcA function specifying how the value of the validators aspect should be calculated from the dependees value.

Definition at line 671 of file Optika_StandardDependencies.hpp.


Member Function Documentation

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

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

Implements Optika::Dependency.

Definition at line 683 of file Optika_StandardDependencies.hpp.

template<class S >
S Optika::NumberValidatorAspectDependency< S >::runFunction ( argument) const [inline, private]

Runs the dependency's function on the given argument and returns the value that function returns.

Parameters:
Thevalue to run the function on.
Returns:
The value the function returned.

Definition at line 722 of file Optika_StandardDependencies.hpp.

template<class S >
void Optika::NumberValidatorAspectDependency< 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::Dependency.

Definition at line 729 of file Optika_StandardDependencies.hpp.


Member Data Documentation

The aspect of the validator to be modified.

Definition at line 702 of file Optika_StandardDependencies.hpp.

The validator to be modified.

Definition at line 707 of file Optika_StandardDependencies.hpp.

template<class S >
S(* Optika::NumberValidatorAspectDependency< S >::func)(S) [private]

The function used to calculate the new value of the aspect of the validator.

Definition at line 713 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