53 A.sublist(
"SublistA").set(
"param_a",
"a");
54 A.sublist(
"SublistA").sublist(
"SublistB").set(
"param_b",
"b");
55 out <<
"\nA:\n";
A.print(out);
60 out <<
"\nB:\n";
B.print(out);
76 A.set(
"conflicting param",
"a");
77 A.sublist(
"SublistA").set(
"param_a",
"a");
78 A.sublist(
"SublistA").sublist(
"SublistB").set(
"param_b",
"b");
79 out <<
"\nA:\n";
A.print(out);
80 std::stringstream Astream;
85 B.set(
"conflicting param",
"b");
87 out <<
"\nB:\n";
B.print(out);
95 C.set(
"conflicting param",
"c");
97 out <<
"\nC:\n";
C.print(out);
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#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.
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 writeParameterListToXmlOStream(const ParameterList ¶mList, std::ostream &xmlOut, RCP< const DependencySheet > depSheet=null)
Write parameters and sublists in XML format to an std::ostream.
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.
T & getParameter(ParameterList &l, const std::string &name)
A templated helper function for getting a parameter from a non-const list. This helper function preve...
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void writeParameterListToXmlFile(const ParameterList ¶mList, const std::string &xmlFileName, RCP< const DependencySheet > depSheet=null)
Write parameters and sublist to an XML file.
Ptr< T > inoutArg(T &arg)
create a non-persisting (required or optional) input/output argument for a function call.