From 2c80227339538154ad0869e746f52db805325589 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 05:13:21 -0400 Subject: Added basic foundation for XML reporting --- src/annotate.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/annotate.h') diff --git a/src/annotate.h b/src/annotate.h index 9ca994c9..37810fb9 100644 --- a/src/annotate.h +++ b/src/annotate.h @@ -110,6 +110,29 @@ private: #endif // HAVE_BOOST_SERIALIZATION }; +inline void to_xml(std::ostream& out, const annotation_t& details) +{ + push_xml x(out, "annotation"); + + if (details.price) + { + push_xml y(out, "ann-price"); + to_xml(out, *details.price); + } + + if (details.date) + { + push_xml y(out, "ann-date"); + to_xml(out, *details.date); + } + + if (details.tag) + { + push_xml y(out, "ann-tag"); + out << y.guard(*details.tag); + } +} + struct keep_details_t { bool keep_price; -- cgit v1.2.3