61 #define ADD_TYPE_PARAMETER(T,VALUE) \ 62 myList.set( #T , as<T>(VALUE)); 64 #define ADD_ARRAY_TYPE_PARAMETER(T,VALUE) \ 65 myList.set( #T " Array", Array< T >(g_arraySize, ( T ) VALUE ));\ 66 myList.set( #T " 2DArray", TwoDArray< T >(g_arraySize, g_arraySize, ( T ) VALUE )); 67 #define ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(T,VALUE) \ 68 ADD_TYPE_PARAMETER(T,VALUE); \ 69 ADD_ARRAY_TYPE_PARAMETER(T,VALUE); 91 #ifdef HAVE_TEUCHOS_LONG_LONG_INT 94 #endif //HAVE_TEUCHOS_LONG_LONG_INT 105 out <<
"\nmyList:\n";
107 out <<
"\n*readInPL:\n";
108 readInPL->
print(out);
117 badRootElementList = getParametersFromXmlFile(
"BadRootElement.xml"),
121 badParameterListElementList = getParametersFromXmlFile(
"BadParameterListElement.xml"),
125 noNameAttributeList = getParametersFromXmlFile(
"NoNameAttribute.xml"),
129 noTypeAttributeList = getParametersFromXmlFile(
"NoTypeAttribute.xml"),
133 noValueAttributeList = getParametersFromXmlFile(
"NoValueAttribute.xml"),
137 badIdsList = getParametersFromXmlFile(
"DuplicateParameterIDs.xml"),
141 badParameterEntryConverterList = getParametersFromXmlFile(
"CantFindParameterEntryConverter.xml"),
145 #ifdef HAVE_TEUCHOS_DEBUG A thin wrapper around the Teuchos Array class that allows for 2 dimensional arrays.
A collection of standard ValidatorXMLConverters.
XMLObject fromParameterEntrytoXML(RCP< const ParameterEntry > entry, const std::string &name, const ParameterEntry::ParameterEntryID &id, const ValidatortoIDMap &validatorIDsMap) const
Converts the given parameter entry to xml.
#define ADD_TYPE_AND_ARRAY_TYPE_PARAMETER(T, VALUE)
Thrown when a parameter entry tag is missing it's value attribute.
This object is held as the "value" in the Teuchos::ParameterList std::map.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails)...
A collection of standard ParameterEntryXMLConverters.
Thrown when a converter is being used to convert either and XML tag or ParameterEntry with an innappr...
Simple helper functions that make it easy to read and write XML to and from a parameterlist.
void print() const
Print function to use in debugging in a debugger.
TEUCHOS_UNIT_TEST(ConstNonconstObjectContainer, create)
Thrown when a parameter entry tag is missing it's name attribute.
A thin wrapper around the Array class which causes it to be interpurted as a 2D Array.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Thrown when an appropriate ParameterEntryXMLConverter can't be found.
Templated Parameter List class.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Thrown when an element inside a parameter list is bad.
ParameterEntry fromXMLtoParameterEntry(const XMLObject &xmlObj) const
Converts the given xml into a parameter entry.
A database for ValidatorXMLConverters.
Writes a ParameterList to an XML object.
A standard ParameterEntryXMLConverter for most data types.
A class for mapping validators to integers.
Thrown when a parameter entry tag is missing it's type attribute.
A list of parameters of arbitrary type.
Thrown when the root xml tag for a parameter list is incorrect.
A collection of Exceptions that can be potentially thrown when converting a ParameterList to and from...
TEST_ASSERT(castedDep1->getValuesAndValidators().size()==2)
#define ADD_TYPE_PARAMETER(T, VALUE)
Thrown when two parameters in an XML file have the same ID.
Smart reference counting pointer class for automatic garbage collection.
TEST_EQUALITY(rcp_dynamic_cast< const EnhancedNumberValidator< double > >(castedDep1->getValuesAndValidators().find("val1") ->second, true) ->getMax(), double1Vali->getMax())
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...
Definition of Teuchos::as, for conversions between types.
A class providing a simple XML parser. Methods can be overloaded to exploit external XML parsing libr...