Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Teuchos::StringValidatorDependency Class Reference

A StringValidatorDependency 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::StringValidatorDependency:
Teuchos::ValidatorDependency Teuchos::Dependency Teuchos::Describable Teuchos::LabeledObject

Public Types

Public types
typedef std::map< std::string,
RCP< const
ParameterEntryValidator > > 
ValueToValidatorMap
 Conveniece typedef. More...
 
typedef std::pair< std::string,
RCP< const
ParameterEntryValidator > > 
ValueToValidatorPair
 Conveniece typedef. More...
 
- 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

Constructors/Destructor
 StringValidatorDependency (RCP< const ParameterEntry > dependee, RCP< ParameterEntry > dependent, ValueToValidatorMap valuesAndValidators, RCP< ParameterEntryValidator > defaultValidator=null)
 Constructs a StringValidatorDependency. More...
 
 StringValidatorDependency (RCP< const ParameterEntry > dependee, Dependency::ParameterEntryList dependents, ValueToValidatorMap valuesAndValidators, RCP< ParameterEntryValidator > defaultValidator=null)
 Constructs a StringValidatorDependency. More...
 
Getters
const ValueToValidatorMapgetValuesAndValidators () const
 retrieve a const reference to the ValueToValidator map being used by this StringValidatorDependency More...
 
RCP< const
ParameterEntryValidator
getDefaultValidator () const
 
- 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...
 
virtual void print (std::ostream &out) const
 prints out information about the 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...
 
- 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...
 

Overridden from Dependency

void evaluate ()
 
std::string getTypeAttributeValue () const
 
void validateDep () const
 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. More...
 

Additional Inherited Members

- 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...
 
Validation Functions

Detailed Description

A StringValidatorDependency 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 StringValidatorDependency must have the following characterisitics:

If the dependee takes on a value not in the valuesAndValidators map, then the default validator is assigned to the dependent.

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

Definition at line 1247 of file Teuchos_StandardDependencies.hpp.

Member Typedef Documentation

Conveniece typedef.

Definition at line 1258 of file Teuchos_StandardDependencies.hpp.

Conveniece typedef.

Definition at line 1264 of file Teuchos_StandardDependencies.hpp.

Constructor & Destructor Documentation

Teuchos::StringValidatorDependency::StringValidatorDependency ( RCP< const ParameterEntry dependee,
RCP< ParameterEntry dependent,
ValueToValidatorMap  valuesAndValidators,
RCP< ParameterEntryValidator defaultValidator = null 
)

Constructs a StringValidatorDependency.

Parameters
dependeeThe dependee parameter.
dependentThe dependent parameter.
valuesAndValidatorsA map associating string 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 is not in the valuesAndValidators map, this is the validator that will be assigned to the dependent.

Definition at line 277 of file Teuchos_StandardDependencies.cpp.

Teuchos::StringValidatorDependency::StringValidatorDependency ( RCP< const ParameterEntry dependee,
Dependency::ParameterEntryList  dependents,
ValueToValidatorMap  valuesAndValidators,
RCP< ParameterEntryValidator defaultValidator = null 
)

Constructs a StringValidatorDependency.

Parameters
dependeeThe dependee parameter.
dependentsThe dependents.
valuesAndValidatorsA map associating string 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 is not in the valuesAndValidators map, this is the validator that will be assigned to the dependent.

Definition at line 289 of file Teuchos_StandardDependencies.cpp.

Member Function Documentation

const StringValidatorDependency::ValueToValidatorMap & Teuchos::StringValidatorDependency::getValuesAndValidators ( ) const

retrieve a const reference to the ValueToValidator map being used by this StringValidatorDependency

Definition at line 302 of file Teuchos_StandardDependencies.cpp.

RCP< const ParameterEntryValidator > Teuchos::StringValidatorDependency::getDefaultValidator ( ) const

Definition at line 308 of file Teuchos_StandardDependencies.cpp.

void Teuchos::StringValidatorDependency::evaluate ( )
virtual

Implements Teuchos::ValidatorDependency.

Definition at line 313 of file Teuchos_StandardDependencies.cpp.

std::string Teuchos::StringValidatorDependency::getTypeAttributeValue ( ) const
virtual

Implements Teuchos::Dependency.

Definition at line 333 of file Teuchos_StandardDependencies.cpp.

void Teuchos::StringValidatorDependency::validateDep ( ) const
protectedvirtual

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 Teuchos::Dependency.

Definition at line 337 of file Teuchos_StandardDependencies.cpp.


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