diff options
Diffstat (limited to 'src/commodity.cc')
-rw-r--r-- | src/commodity.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/commodity.cc b/src/commodity.cc index 0d6c11c6..7669b3db 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -654,4 +654,15 @@ bool compare_amount_commodities::operator()(const amount_t * left, } } +void to_xml(std::ostream& out, const commodity_t& comm) +{ + push_xml x(out, "commodity"); + { + push_xml y(out, "symbol"); + out << y.guard(comm.symbol()); + } + if (comm.is_annotated()) + to_xml(out, as_annotated_commodity(comm).details); +} + } // namespace ledger |