diff options
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/amount.cc b/src/amount.cc index 591b0901..dced0625 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -1396,6 +1396,22 @@ void amount_t::write(std::ostream& out, unsigned int index) const } } +void amount_t::read_xml(std::istream& in) +{ +} + +void amount_t::write_xml(std::ostream& out, const int depth) const +{ + xml_print(out, "<amount>\n", depth); + + commodity().write_xml(out, depth + 1); + + xml_print(out, "<quantity>", depth + 1); + out << quantity_string() << "</quantity>\n"; + + xml_print(out, "</amount>\n", depth); +} + bool amount_t::valid() const { if (quantity) { |