38 AutoPtr<Document> pDoc =
new Document;
39 AutoPtr<Element> functionElement = pDoc->createElement(
"Function");
40 pDoc->appendChild(functionElement);
41 AutoPtr<Element> typeElement = pDoc->createElement(
"Type");
42 AutoPtr<Text> typeText = pDoc->createTextNode(this->
getName());
43 typeElement->appendChild(typeText);
44 functionElement->appendChild(typeElement);
45 AutoPtr<Element> parameterListElement = pDoc->createElement(
"ParameterList");
46 functionElement->appendChild(parameterListElement);
48 std::string functionXML =
50 [](
const auto &lhs,
const auto &function) { return lhs + function->toXMLString(); });
51 AutoPtr<Text> functionFormatText = pDoc->createTextNode(
"%s");
52 functionElement->appendChild(functionFormatText);
54 std::stringstream xmlstream;
56 writer.writeNode(xmlstream, pDoc);
58 std::string formattedXMLString = boost::str(boost::format(xmlstream.str().c_str()) % functionXML.c_str());
59 return formattedXMLString;