57 "filename", &
filename,
"XML file to parse" );
62 std::string xmlstring(
64 " <ParameterList name=\"SubList\">\n"
65 " </ParameterList> \n"
66 "</ParameterList> \n");
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.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
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.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlString(const std::string &xmlStr, const Ptr< ParameterList > ¶mList, bool overwrite=true)
Reads XML parameters from a std::string and updates those already in the given parameter list.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void updateParametersFromXmlFile(const std::string &xmlFileName, const Ptr< ParameterList > ¶mList)
Reads XML parameters from a file and updates those already in the given parameter list.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlString(const std::string &xmlStr)
Reads XML parameters from a std::string and return them in a new parameter list.
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< ParameterList > getParametersFromXmlFile(const std::string &xmlFileName)
Reads XML parameters from a file and return them in a new parameter list.
Ptr< T > inOutArg(T &arg)
create a non-persisting (required or optional) input/output argument for a function call.
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