Teuchos - Trilinos Tools Package Version of the Day
|
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>
Public Types | |
Public types | |
typedef std::map< std::string, RCP< const ParameterEntryValidator > > | ValueToValidatorMap |
Conveniece typedef. | |
typedef std::pair< std::string, RCP< const ParameterEntryValidator > > | ValueToValidatorPair |
Conveniece typedef. | |
![]() | |
typedef std::set< RCP< ParameterEntry >, RCPComp > | ParameterEntryList |
A list of Dependees. | |
typedef std::set< RCP< const ParameterEntry >, RCPConstComp > | ConstParameterEntryList |
A list of dependents. | |
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. | |
Additional Inherited Members | |
![]() | |
static const std::string & | getXMLTagName () |
Returns the XML tag to use when serializing Dependencies. | |
![]() | |
static const EVerbosityLevel | verbLevel_default = VERB_DEFAULT |
Default value for the verbLevel argument of describe(). | |
Validation Functions | |
![]() | |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
Describable output stream manipulator. | |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
Output stream operator for Describable manipulator. | |
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.
typedef std::map<std::string, RCP<const ParameterEntryValidator> > Teuchos::StringValidatorDependency::ValueToValidatorMap |
Conveniece typedef.
Definition at line 1258 of file Teuchos_StandardDependencies.hpp.
typedef std::pair<std::string, RCP<const ParameterEntryValidator> > Teuchos::StringValidatorDependency::ValueToValidatorPair |
Conveniece typedef.
Definition at line 1264 of file Teuchos_StandardDependencies.hpp.
Teuchos::StringValidatorDependency::StringValidatorDependency | ( | RCP< const ParameterEntry > | dependee, |
RCP< ParameterEntry > | dependent, | ||
ValueToValidatorMap | valuesAndValidators, | ||
RCP< ParameterEntryValidator > | defaultValidator = null ) |
Constructs a StringValidatorDependency.
dependee | The dependee parameter. |
dependent | The dependent parameter. |
valuesAndValidators | A 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. |
defaultValidator | If 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.
dependee | The dependee parameter. |
dependents | The dependents. |
valuesAndValidators | A 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. |
defaultValidator | If 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.
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.
|
virtual |
Implements Teuchos::ValidatorDependency.
Definition at line 313 of file Teuchos_StandardDependencies.cpp.
|
virtual |
Implements Teuchos::Dependency.
Definition at line 333 of file Teuchos_StandardDependencies.cpp.
|
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.