57 "filename", &
filename,
"XML file to parse" );
62 std::string xmlstring(
64 " <ParameterList name=\"SubList\">\n"
65 " </ParameterList> \n"
66 "</ParameterList> \n");
68 updateParametersFromXmlString( xmlstring, plist() );
79 std::string xmlstring( (std::istreambuf_iterator<char>(fin)),
80 std::istreambuf_iterator<char>() );
92 out <<
"Changing policy to disallow duplicate sublists" << std::endl;
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
#define TEST_NOTHROW(code)
Asserr that the statement 'code' does not thrown any excpetions.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails).
Templated Parameter List class.
Simple helper functions that make it easy to read and write XML to and from a parameterlist.
Writes an XML object to a parameter list.
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
Set a boolean option.
Optionally thrown when a sublist is set twice by either updateParametersFromXmlFile(),...
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
static CommandLineProcessor & getCLP()
Return the CLP to add options to.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
Writes an XML object to a parameter list.
bool getAllowsDuplicateSublists() const
Specifies the current policy regarding duplicated sublists. See setAllowsDuplicateSublists() for more...
void setAllowsDuplicateSublists(bool policy)
Set policy regarding duplicated sublists.
RCP< ParameterList > toParameterList(const XMLObject &xml, RCP< DependencySheet > depSheet) const
TEUCHOS_UNIT_TEST(ConstNonconstObjectContainer, create)