summaryrefslogtreecommitdiff
path: root/src/annotate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/annotate.h')
-rw-r--r--src/annotate.h23
1 files changed, 23 insertions, 0 deletions
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;