63 void printDoc(
const std::string& docString, std::ostream& out)
const {}
76 return "UNDEFINEDTYPE";
109 #ifdef HAVE_TEUCHOS_DEBUG
116 anyNumberParameterEntryValidator();
141 myList.set(
"default",
"",
"parameter for default validator",
143 myList.set(
"non default",
"blah.txt",
"parameter for non default validator",
168 myList.set(
"non default",
"kurtis",
"parameter for non default validator",
190 "A parameter with a BoolParameterEntryValidator validator.",
205 std::string
xmlFileName =
"AnyNumberValidatorList.xml";
224 "A prameter with an AnyNumberValidator on it that has the preferred and accepted types differnet from the default",
272 "step, and prec validator",
549 pl.set(
"string param",
"hi",
"a string param",
stringVali);
556 readInPL->getEntry(
"string array param").validator(),
true);
562#define FULL_NUMBER_TYPE_TEST( T ) \
563TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Validator, EnhancedNumberValidatorConverter, T ) \
564TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Validator, NumberArrayValidatorConverterTest, T ) \
565TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Validator, StringToIntegralConverterTest, T )
567#define NONINTEGRAL_NUMBER_TYPE_TEST( T ) \
568TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Validator, EnhancedNumberValidatorConverter, T ) \
569TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT(Teuchos_Validator, NumberArrayValidatorConverterTest, T )
571typedef unsigned int uint;
572typedef unsigned short ushort;
573typedef unsigned long ulong;
579typedef long long int llint;
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails).
#define TEST_COMPARE_ARRAYS(a1, a2)
Assert that a1.size()==a2.size() and a[i]==b[i], i=0....
Templated Parameter List class.
A collection of standard ValidatorXMLConverters.
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(TEST_GROUP, TEST_NAME, TYPE)
Macro for defining a templated unit test with one template parameter.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
A database for ValidatorXMLConverters.
Simple helper functions that make it easy to read and write XML to and from a parameterlist.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
Writes a ParameterList to an XML object.
#define FULL_NUMBER_TYPE_TEST(T)
#define NONINTEGRAL_NUMBER_TYPE_TEST(T)
Determines the types that are accepted.
Standard implementation of a ParameterEntryValidator that accepts numbers from a number of different ...
Converts AnyNumberParameterEntryValidators to and from XML.
Thrown when xml tag is encountered that is either unrecognized or inappropriate for a given context.
Thrown when a bad validator xml converter is used.
Standard implementation of a BoolParameterEntryValidator that accepts bool values (true/false) or str...
Thrown when the ValidatorXMLConverterDB can't find an appropriate converter.
int size(const Comm< Ordinal > &comm)
Get the number of processes in the communicator.
Constructs a CantFindParameterEntryConverterException.
Validate a file name entry.
Maps Validators to integers.
Thrown when a referenced validator can't be found.
Abstract interface for an object that can validate a ParameterEntry's value.
This object is held as the "value" in the Teuchos::ParameterList std::map.
A list of parameters of arbitrary type.
Concrete serial communicator subclass.
Converts StringValidators to and from XML.
A simple validator that only allows certain string values to be choosen or simply enforces that a par...
static std::string name()
void validate(ParameterEntry const &entry, std::string const ¶mName, std::string const &sublistName) const
Validate a parameter entry value and throw std::exception (with a great error message) if validation ...
ValidStringsList validStringValues() const
Return an array of strings of valid values if applicable.
const std::string getXMLTypeName() const
Get a string that should be used as a value of the type attribute when serializing it to XML.
void printDoc(const std::string &docString, std::ostream &out) const
Print documentation for this parameter.
static void printKnownConverters(std::ostream &out)
prints the xml tags associated with all known converters
static RCP< const ValidatorXMLConverter > getConverter(const ParameterEntryValidator &validator)
Get an appropriate ValidatorXMLConverter given a Validator.
A class for mapping validators to integers.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > writeThenReadPL(ParameterList &myList)
Write a parameter list to xml and then read that xml back in via a string. The intent of this functio...