25 int main(
int argc,
char** argv)
39 solver.
addInt(
"maxiters", 1000);
40 solver.
addInt(
"restarts", 100);
53 std::cerr <<
"Find child didn't find the child!"
54 <<std::endl << std::endl;
61 std::cerr <<
"Find child found the wrong tag!" << std::endl <<
62 "Found index was: " << foundIndex << std::endl <<
63 std::endl << std::endl;
68 std::cerr <<
"First first child didn't return -1 when it was "
69 "suppose to!" <<std::endl << std::endl;
73 std::string str = problem.
toString();
74 std::cerr << str << std::endl;
80 std::cerr << reread << std::endl;
83 std::ofstream of(
"tmp.xml");
84 of << reread << std::endl;
89 std::cerr << fileXML << std::endl;
93 catch(std::exception& e)
95 std::cerr << e.what() << std::endl;
const std::string & getTag() const
Return the tag of the current node.
void addChild(const XMLObject &child)
Add a child node to the node.
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
Initialize, finalize, and query the global MPI session.
std::string toString() const
Represent this node and its children as a std::string.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
std::string Teuchos_Version()
int main(int argc, char *argv[])
A MPI utilities class, providing methods for initializing, finalizing, and querying the global MPI se...
void addInt(const std::string &name, int val)
Add an int as an attribute.
int findFirstChild(std::string tagName) const
Returns the index of the first child found with the given tag name. Returns -1 if no child is found...
const XMLObject & getChild(int i) const
Return the i-th child node.
void addDouble(const std::string &name, double val)
Add a double as an attribute.
An object representation of a subset of XML data.