diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-25 05:13:21 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-09 02:17:26 -0500 |
commit | 2c80227339538154ad0869e746f52db805325589 (patch) | |
tree | 091188e3ad5c8cc41e3f94285969ef9849a97ac4 /src/commodity.cc | |
parent | 7411c74d6d5bea42cb9fa5b6b0ed90480c954a03 (diff) | |
download | fork-ledger-2c80227339538154ad0869e746f52db805325589.tar.gz fork-ledger-2c80227339538154ad0869e746f52db805325589.tar.bz2 fork-ledger-2c80227339538154ad0869e746f52db805325589.zip |
Added basic foundation for XML reporting
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 |