#include <Teuchos_ParameterEntryValidator.hpp>
Public Member Functions | |
virtual | ~ParameterEntryValidator () |
| |
virtual void | printDoc (std::string const &docString, std::ostream &out) const =0 |
Print documentation for this parameter. | |
virtual Teuchos::RCP< const Array< std::string > > | validStringValues () const =0 |
Return an array of strings of valid values if applicable. | |
virtual void | validate (ParameterEntry const &entry, std::string const ¶mName, std::string const &sublistName) const =0 |
Validate a parameter entry value and throw std::exception (with a great error message) if validation fails. | |
virtual void | validateAndModify (std::string const ¶mName, std::string const &sublistName, ParameterEntry *entry) const |
Validate and perhaps modify a parameter entry's value. |
Not only can a validator validate and entry but it can also help to set and/or adjust the default value.
Definition at line 50 of file Teuchos_ParameterEntryValidator.hpp.
virtual Teuchos::ParameterEntryValidator::~ParameterEntryValidator | ( | ) | [inline, virtual] |
virtual void Teuchos::ParameterEntryValidator::printDoc | ( | std::string const & | docString, | |
std::ostream & | out | |||
) | const [pure virtual] |
Print documentation for this parameter.
docString | [in] (Multi-line) documentation std::string. | |
out | [out] The std::ostream used for the output |
docString
with some description of what valid values this parameter validator will accept.
Implemented in Teuchos::StringToIntegralParameterEntryValidator< IntegralType >, and Teuchos::AnyNumberParameterEntryValidator.
virtual void Teuchos::ParameterEntryValidator::validate | ( | ParameterEntry const & | entry, | |
std::string const & | paramName, | |||
std::string const & | sublistName | |||
) | const [pure virtual] |
Validate a parameter entry value and throw std::exception (with a great error message) if validation fails.
entry | [in] The ParameterEntry who's type and value is being validated | |
paramName | [in] The name of the ParameterEntry that is used to build error messages. | |
sublistName | [in] The name of the ParameterList that paramName exists in that is used to build error messages. |
Implemented in Teuchos::StringToIntegralParameterEntryValidator< IntegralType >, and Teuchos::AnyNumberParameterEntryValidator.
virtual void Teuchos::ParameterEntryValidator::validateAndModify | ( | std::string const & | paramName, | |
std::string const & | sublistName, | |||
ParameterEntry * | entry | |||
) | const [inline, virtual] |
Validate and perhaps modify a parameter entry's value.
paramName | [in] The name of the ParameterEntry that is used to build error messages. | |
sublistName | [in] The name of the ParameterList that paramName exists in that is used to build error messages. | |
entry | [in/out] The ParameterEntry who's type and value is being validated and perhaps even changed as a result of calling this function. |
this->validate()
.
Reimplemented in Teuchos::AnyNumberParameterEntryValidator.
Definition at line 113 of file Teuchos_ParameterEntryValidator.hpp.
virtual Teuchos::RCP<const Array<std::string> > Teuchos::ParameterEntryValidator::validStringValues | ( | ) | const [pure virtual] |
Return an array of strings of valid values if applicable.
If there is no such array of std::string values that makes since, just return return.get()==NULL
.
The returned strings must not contain any newlines (i.e. no '
characters) and must be short enough to fit on one line and be readable.
'
Implemented in Teuchos::StringToIntegralParameterEntryValidator< IntegralType >, and Teuchos::AnyNumberParameterEntryValidator.