#include <Teuchos_StandardParameterEntryValidators.hpp>


Public Member Functions | |
Constructors | |
| StringToIntegralParameterEntryValidator (ArrayView< const std::string > const &strings, std::string const &defaultParameterName) | |
Construct with a mapping from strings to ordinals 0 to n-1. | |
| StringToIntegralParameterEntryValidator (ArrayView< const std::string > const &strings, ArrayView< const IntegralType > const &integralValues, std::string const &defaultParameterName) | |
| Construct with a mapping from strings to aribitrary typed integral values. | |
| StringToIntegralParameterEntryValidator (ArrayView< const std::string > const &strings, ArrayView< const std::string > const &stringsDocs, ArrayView< const IntegralType > const &integralValues, std::string const &defaultParameterName) | |
| Construct with a mapping from strings (with documentation) to aribitrary typed integral values. | |
Local non-virtual validated lookup functions | |
| IntegralType | getIntegralValue (const std::string &str, const std::string ¶mName="", const std::string &sublistName="") const |
| Perform a mapping from a std::string value to its integral value. | |
| IntegralType | getIntegralValue (const ParameterEntry &entry, const std::string ¶mName="", const std::string &sublistName="", const bool activeQuery=true) const |
Perform a mapping from a std::string value embedded in a ParameterEntry object and return its associated integral value. | |
| std::string | getStringValue (const ParameterEntry &entry, const std::string ¶mName="", const std::string &sublistName="", const bool activeQuery=true) const |
Get and validate a std::string value embedded in a ParameterEntry object. | |
| IntegralType | getIntegralValue (ParameterList ¶mList, const std::string ¶mName, const std::string &defaultValue) const |
Lookup a parameter from a parameter list, perform a mapping from a std::string value embedded in the ParameterEntry object and return its associated integral value. | |
| std::string | getStringValue (ParameterList ¶mList, const std::string ¶mName, const std::string &defaultValue) const |
| Lookup a parameter from a parameter list, validate the std::string value, and return the std::string value. | |
| std::string | validateString (const std::string &str, const std::string ¶mName="", const std::string &sublistName="") const |
| Validate the std::string and pass it on.. | |
Overridden from ParameterEntryValidator | |
| void | printDoc (std::string const &docString, std::ostream &out) const |
| | |
| Teuchos::RCP< const Array < std::string > > | validStringValues () const |
| | |
| void | validate (ParameterEntry const &entry, std::string const ¶mName, std::string const &sublistName) const |
| | |
Related Functions | |
| (Note that these are not member functions.) | |
| template<class IntegralType > | |
| RCP < StringToIntegralParameterEntryValidator < IntegralType > > | stringToIntegralParameterEntryValidator (ArrayView< const std::string > const &strings, std::string const &defaultParameterName) |
| Nonmember constructor (see implementation). | |
| template<class IntegralType > | |
| RCP < StringToIntegralParameterEntryValidator < IntegralType > > | stringToIntegralParameterEntryValidator (ArrayView< const std::string > const &strings, ArrayView< const IntegralType > const &integralValues, std::string const &defaultParameterName) |
| Nonmember constructor (see implementation). | |
| template<class IntegralType > | |
| RCP < StringToIntegralParameterEntryValidator < IntegralType > > | stringToIntegralParameterEntryValidator (ArrayView< const std::string > const &strings, ArrayView< const std::string > const &stringsDocs, ArrayView< const IntegralType > const &integralValues, std::string const &defaultParameterName) |
| Nonmember constructor (see implementation). | |
Objects of this type are meant to be used as both abstract objects passed to Teuchos::ParameterList objects to be used to validate parameter types and values, and to be used by the code that reads parameter values. Having a single definition for the types of valids input and outputs for a parameter value makes it easier to write error free validated code.
Definition at line 54 of file Teuchos_StandardParameterEntryValidators.hpp.
| Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::StringToIntegralParameterEntryValidator | ( | ArrayView< const std::string > const & | strings, | |
| std::string const & | defaultParameterName | |||
| ) | [inline] |
Construct with a mapping from strings to ordinals 0 to n-1.
| strings | [in] Array of unique std::string names. | |
| defaultParameterName | [in] The default name of the parameter (used in error messages) |
Definition at line 720 of file Teuchos_StandardParameterEntryValidators.hpp.
| Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::StringToIntegralParameterEntryValidator | ( | ArrayView< const std::string > const & | strings, | |
| ArrayView< const IntegralType > const & | integralValues, | |||
| std::string const & | defaultParameterName | |||
| ) | [inline] |
Construct with a mapping from strings to aribitrary typed integral values.
| strings | [in] Array of unique std::string names. | |
| integralValues | [in] Array that gives the integral values associated with strings[] | |
| defaultParameterName | [in] The default name of the parameter (used in error messages) |
strings.size() == integralValues.size() Definition at line 739 of file Teuchos_StandardParameterEntryValidators.hpp.
| Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::StringToIntegralParameterEntryValidator | ( | ArrayView< const std::string > const & | strings, | |
| ArrayView< const std::string > const & | stringsDocs, | |||
| ArrayView< const IntegralType > const & | integralValues, | |||
| std::string const & | defaultParameterName | |||
| ) | [inline] |
Construct with a mapping from strings (with documentation) to aribitrary typed integral values.
| strings | [in] Array of unique std::string names. | |
| stringsDocs | [in] Array of documentation strings for each std::string value. | |
| integralValues | [in] Array that gives the integral values associated with strings[] | |
| defaultParameterName | [in] The default name of the parameter (used in error messages) |
strings.size() == stringDocs.size() strings.size() == integralValues.size() Definition at line 762 of file Teuchos_StandardParameterEntryValidators.hpp.
| IntegralType Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::getIntegralValue | ( | ParameterList & | paramList, | |
| const std::string & | paramName, | |||
| const std::string & | defaultValue | |||
| ) | const [inline] |
Lookup a parameter from a parameter list, perform a mapping from a std::string value embedded in the ParameterEntry object and return its associated integral value.
Definition at line 850 of file Teuchos_StandardParameterEntryValidators.hpp.
| IntegralType Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::getIntegralValue | ( | const ParameterEntry & | entry, | |
| const std::string & | paramName = "", |
|||
| const std::string & | sublistName = "", |
|||
| const bool | activeQuery = true | |||
| ) | const [inline] |
Perform a mapping from a std::string value embedded in a ParameterEntry object and return its associated integral value.
| entry | [in] The std::string entry. | |
| paramName | [in] Optional name that will be used to generate error messages. | |
| sublistName | [in] The name of the sublist. | |
| activeQuery | [in] If true, then this lookup will be recored as an active query which will turn the isUsed bool to true. |
Definition at line 814 of file Teuchos_StandardParameterEntryValidators.hpp.
| IntegralType Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::getIntegralValue | ( | const std::string & | str, | |
| const std::string & | paramName = "", |
|||
| const std::string & | sublistName = "" | |||
| ) | const [inline] |
Perform a mapping from a std::string value to its integral value.
| str | [in] String that is being used to lookup the corresponding integral value. | |
| paramName | [in] Optional name that will be used to generate error messages. |
str does not exist, the an std::exception will be thrown with a very descriptive error message.
Definition at line 792 of file Teuchos_StandardParameterEntryValidators.hpp.
| std::string Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::getStringValue | ( | ParameterList & | paramList, | |
| const std::string & | paramName, | |||
| const std::string & | defaultValue | |||
| ) | const [inline] |
Lookup a parameter from a parameter list, validate the std::string value, and return the std::string value.
Definition at line 863 of file Teuchos_StandardParameterEntryValidators.hpp.
| std::string Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::getStringValue | ( | const ParameterEntry & | entry, | |
| const std::string & | paramName = "", |
|||
| const std::string & | sublistName = "", |
|||
| const bool | activeQuery = true | |||
| ) | const [inline] |
Get and validate a std::string value embedded in a ParameterEntry object.
| entry | [in] The std::string entry. | |
| paramName | [in] Optional name that will be used to generate error messages. | |
| sublistName | [in] The name of the sublist. | |
| activeQuery | [in] If true, then this lookup will be recored as an active query which will turn the isUsed bool to true. |
Definition at line 836 of file Teuchos_StandardParameterEntryValidators.hpp.
| void Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::printDoc | ( | std::string const & | docString, | |
| std::ostream & | out | |||
| ) | const [inline, virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 891 of file Teuchos_StandardParameterEntryValidators.hpp.
| void Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::validate | ( | ParameterEntry const & | entry, | |
| std::string const & | paramName, | |||
| std::string const & | sublistName | |||
| ) | const [inline, virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 923 of file Teuchos_StandardParameterEntryValidators.hpp.
| std::string Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::validateString | ( | const std::string & | str, | |
| const std::string & | paramName = "", |
|||
| const std::string & | sublistName = "" | |||
| ) | const [inline] |
Validate the std::string and pass it on..
| str | [in] String that is being used to lookup the corresponding integral value. | |
| name | [in] Optional name that will be used to generate error messages. |
str does not exist, the an std::exception will be thrown with a very descriptive error message.
Definition at line 877 of file Teuchos_StandardParameterEntryValidators.hpp.
| Teuchos::RCP< const Array< std::string > > Teuchos::StringToIntegralParameterEntryValidator< IntegralType >::validStringValues | ( | ) | const [inline, virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 916 of file Teuchos_StandardParameterEntryValidators.hpp.
| RCP< StringToIntegralParameterEntryValidator< IntegralType > > stringToIntegralParameterEntryValidator | ( | ArrayView< const std::string > const & | strings, | |
| ArrayView< const std::string > const & | stringsDocs, | |||
| ArrayView< const IntegralType > const & | integralValues, | |||
| std::string const & | defaultParameterName | |||
| ) | [related] |
Nonmember constructor (see implementation).
| RCP< StringToIntegralParameterEntryValidator< IntegralType > > stringToIntegralParameterEntryValidator | ( | ArrayView< const std::string > const & | strings, | |
| ArrayView< const IntegralType > const & | integralValues, | |||
| std::string const & | defaultParameterName | |||
| ) | [related] |
Nonmember constructor (see implementation).
| RCP< StringToIntegralParameterEntryValidator< IntegralType > > stringToIntegralParameterEntryValidator | ( | ArrayView< const std::string > const & | strings, | |
| std::string const & | defaultParameterName | |||
| ) | [related] |
Nonmember constructor (see implementation).
1.5.9