From 9f8997f1b52f55225c76cf92461a05940d71a9e7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Feb 2009 01:48:07 -0400 Subject: Values can now be streamed to XML, and all the types they refer to. --- src/balance.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/balance.cc') diff --git a/src/balance.cc b/src/balance.cc index 7b1ed4dd..b5c0aed7 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -252,4 +252,14 @@ void balance_t::print(std::ostream& out, } } +void balance_t::write_xml(std::ostream& out, const int depth) const +{ + out << xml_str("\n", depth); + + foreach (const amounts_map::value_type& pair, amounts) + pair.second.write_xml(out, depth + 1); + + out << xml_str("\n", depth); +} + } // namespace ledger -- cgit v1.2.3