Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Teuchos::RangeValidatorDependency< T > Class Template Reference

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. More...

#include <Teuchos_StandardDependencies.hpp>

Inheritance diagram for Teuchos::RangeValidatorDependency< T >:
Inheritance graph
[legend]

Public types

typedef std::pair< T, T > Range
 Convenience typedef. More...
 
typedef std::map< Range, RCP
< const
ParameterEntryValidator > > 
RangeToValidatorMap
 Convenience typedef. More...
 
typedef std::pair< Range, RCP
< const
ParameterEntryValidator > > 
RangeValidatorPair
 Convenience typedef. More...
 

Constructors/Destructor

 RangeValidatorDependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, RangeToValidatorMap rangesAndValidators, RCP< const ParameterEntryValidator > defaultValidator=null)
 Constructs a RangeValidatorDependency. More...
 
 RangeValidatorDependency (RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, RangeToValidatorMap rangesAndValidators, RCP< const ParameterEntryValidator > defaultValidator=null)
 Constructs a RangeValidatorDependency. More...
 

Getters

const RangeToValidatorMapgetRangeToValidatorMap () const
 
RCP< const
ParameterEntryValidator
getDefaultValidator () const
 

Overridden from Dependency

void evaluate ()
 
std::string getTypeAttributeValue () const
 
void validateDep () const
 

Private Members

RangeToValidatorMap rangesAndValidators_
 A map associating ranges with validators. More...
 
RCP< const
ParameterEntryValidator
defaultValidator_
 
void setDependentsToValidator (RCP< const ParameterEntryValidator > toSet)
 

Additional Inherited Members

- Public Types inherited from Teuchos::Dependency
typedef std::set< RCP
< ParameterEntry >, RCPComp
ParameterEntryList
 A list of Dependees. More...
 
typedef std::set< RCP< const
ParameterEntry >, RCPConstComp
ConstParameterEntryList
 A list of dependents. More...
 
- Public Member Functions inherited from Teuchos::ValidatorDependency
 ValidatorDependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent)
 Constructs a ValidatorDependency. More...
 
 ValidatorDependency (RCP< const ParameterEntry > dependee, ParameterEntryList dependents)
 Constructs a ValidatorDependency. More...
 
- Public Member Functions inherited from Teuchos::Dependency
 Dependency (ConstParameterEntryList dependees, ParameterEntryList dependents)
 Constructs a Dependency. More...
 
 Dependency (ConstParameterEntryList dependees, RCP< ParameterEntry > dependent)
 Constructs a Dependency. More...
 
 Dependency (RCP< const ParameterEntry > dependee, ParameterEntryList dependents)
 Constructs a Dependency. More...
 
 Dependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent)
 Constructs a Dependency. More...
 
const ConstParameterEntryListgetDependees () const
 Gets the dependees of the dependency. More...
 
ParameterEntryListgetDependents ()
 Gets the dependents of the dependency. More...
 
const ConstParameterEntryListgetDependents () const
 Gets the dependents of the dependency. More...
 
RCP< const ParameterEntrygetFirstDependee () const
 Gets the first dependee in the dependees list. This is a convience function. More...
 
template<class S >
getFirstDependeeValue () const
 Convienence function. Returns the first dependee in the list of dependees. More...
 
virtual void print (std::ostream &out) const
 prints out information about the dependency. More...
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 Return a simple one-line description of this object. More...
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 Print the object with some verbosity level to a FancyOStream. More...
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 Version of describe() that takes an std::ostream instead of a FancyOStream. More...
 
virtual ~Describable ()
 Destructor (marked virtual for memory safety of derived classes). More...
 
- Public Member Functions inherited from Teuchos::LabeledObject
 LabeledObject ()
 Construct with an empty label. More...
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 Set the object label (see LabeledObject). More...
 
virtual std::string getObjectLabel () const
 Get the object label (see LabeledObject). More...
 
- Static Public Member Functions inherited from Teuchos::Dependency
static const std::string & getXMLTagName ()
 Returns the XML tag to use when serializing Dependencies. More...
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default = VERB_DEFAULT
 Default value for the verbLevel argument of describe(). More...
 
- Protected Member Functions inherited from Teuchos::Dependency

Detailed Description

template<class T>
class Teuchos::RangeValidatorDependency< T >

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 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. If the value doesn't fall within any of the ranges, the dependent's validator is set to the specified default validator. If no default validator was specified, then the dependents validator is set to null.

The minimum of ranges is inclusive and the maximum is exclusive.

A RangeValidatorDependency must have the following characterisitics:

Please see RangeValidatorDependencyXMLConverter for documentation regarding the XML representation of this Dependency.

Definition at line 1548 of file Teuchos_StandardDependencies.hpp.

Member Typedef Documentation

template<class T>
typedef std::pair<T,T> Teuchos::RangeValidatorDependency< T >::Range

Convenience typedef.

Definition at line 1558 of file Teuchos_StandardDependencies.hpp.

template<class T>
typedef std::map<Range, RCP<const ParameterEntryValidator> > Teuchos::RangeValidatorDependency< T >::RangeToValidatorMap

Convenience typedef.

Definition at line 1564 of file Teuchos_StandardDependencies.hpp.

template<class T>
typedef std::pair<Range, RCP<const ParameterEntryValidator> > Teuchos::RangeValidatorDependency< T >::RangeValidatorPair

Convenience typedef.

Definition at line 1570 of file Teuchos_StandardDependencies.hpp.

Constructor & Destructor Documentation

template<class T >
Teuchos::RangeValidatorDependency< T >::RangeValidatorDependency ( RCP< const ParameterEntry dependee,
RCP< ParameterEntry dependent,
RangeToValidatorMap  rangesAndValidators,
RCP< const ParameterEntryValidator defaultValidator = null 
)

Constructs a RangeValidatorDependency.

Parameters
dependeeThe dependee parameter.
dependentThe dependent parameter.
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.
defaultValidatorThe default validator to be used if the dependee's value does not fall within one of the specified ranges.

Definition at line 1678 of file Teuchos_StandardDependencies.hpp.

template<class T >
Teuchos::RangeValidatorDependency< T >::RangeValidatorDependency ( RCP< const ParameterEntry dependee,
Dependency::ParameterEntryList  dependents,
RangeToValidatorMap  rangesAndValidators,
RCP< const ParameterEntryValidator defaultValidator = null 
)

Constructs a RangeValidatorDependency.

Parameters
dependeeThe dependee parameter.
dependentsThe dependents.
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.
defaultValidatorThe default validator to be used if the dependee's value does not fall within one of the specified ranges.

Definition at line 1691 of file Teuchos_StandardDependencies.hpp.

Member Function Documentation

template<class T>
const RangeToValidatorMap& Teuchos::RangeValidatorDependency< T >::getRangeToValidatorMap ( ) const
inline

Definition at line 1621 of file Teuchos_StandardDependencies.hpp.

template<class T>
RCP<const ParameterEntryValidator> Teuchos::RangeValidatorDependency< T >::getDefaultValidator ( ) const
inline

Definition at line 1626 of file Teuchos_StandardDependencies.hpp.

template<class T >
void Teuchos::RangeValidatorDependency< T >::evaluate ( )
virtual

Implements Teuchos::ValidatorDependency.

Definition at line 1711 of file Teuchos_StandardDependencies.hpp.

template<class T >
std::string Teuchos::RangeValidatorDependency< T >::getTypeAttributeValue ( ) const
virtual

Implements Teuchos::Dependency.

Definition at line 1704 of file Teuchos_StandardDependencies.hpp.

template<class T >
void Teuchos::RangeValidatorDependency< T >::validateDep ( ) const
protectedvirtual

Implements Teuchos::Dependency.

Definition at line 1730 of file Teuchos_StandardDependencies.hpp.

template<class T >
void Teuchos::RangeValidatorDependency< T >::setDependentsToValidator ( RCP< const ParameterEntryValidator toSet)
private

Definition at line 1776 of file Teuchos_StandardDependencies.hpp.

Member Data Documentation

template<class T>
RangeToValidatorMap Teuchos::RangeValidatorDependency< T >::rangesAndValidators_
private

A map associating ranges with validators.

Definition at line 1667 of file Teuchos_StandardDependencies.hpp.

template<class T>
RCP<const ParameterEntryValidator> Teuchos::RangeValidatorDependency< T >::defaultValidator_
private

Definition at line 1671 of file Teuchos_StandardDependencies.hpp.


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