summaryrefslogtreecommitdiff
path: root/xml.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-02 22:45:35 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-02 22:45:35 -0400
commit5a90fe735772fd4d52216ae76ddad893bce177e6 (patch)
tree7f0f70fed0d3ae7deb5770a94ca451953b730625 /xml.cc
parent7b3c8c03c56fa90f8e110ed14ce3af27fb49b458 (diff)
downloadfork-ledger-5a90fe735772fd4d52216ae76ddad893bce177e6.tar.gz
fork-ledger-5a90fe735772fd4d52216ae76ddad893bce177e6.tar.bz2
fork-ledger-5a90fe735772fd4d52216ae76ddad893bce177e6.zip
Moved xact_xdata_t into xact_t itself, as a set of "extended data" that might
be gathered during reporting. Removed the references to accounts and such from the mask logic, which means that the value expression "acount =~ /foo/" is needed in place of just "/foo/".
Diffstat (limited to 'xml.cc')
-rw-r--r--xml.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/xml.cc b/xml.cc
index ebafd65b..c71aaa97 100644
--- a/xml.cc
+++ b/xml.cc
@@ -381,9 +381,9 @@ void format_xml_entries::format_last_entry()
}
bool first = true;
- foreach (const xact_t * xact, last_entry->xacts) {
- if (xact_has_xdata(*xact) &&
- xact_xdata_(*xact).dflags & XACT_TO_DISPLAY) {
+ foreach (xact_t * xact, last_entry->xacts) {
+ if (xact->has_xdata() &&
+ xact->xdata().has_flags(XACT_EXT_TO_DISPLAY)) {
if (first) {
output_stream << " <en:xacts>\n";
first = false;
@@ -427,9 +427,8 @@ void format_xml_entries::format_last_entry()
}
output_stream << " <tr:amount>\n";
- if (xact_xdata_(*xact).dflags & XACT_COMPOUND)
- xml_write_value(output_stream,
- xact_xdata_(*xact).value, 10);
+ if (xact->xdata().has_flags(XACT_EXT_COMPOUND))
+ xml_write_value(output_stream, xact->xdata().value, 10);
else
xml_write_value(output_stream, value_t(xact->amount), 10);
output_stream << " </tr:amount>\n";
@@ -448,13 +447,13 @@ void format_xml_entries::format_last_entry()
if (show_totals) {
output_stream << " <total>\n";
- xml_write_value(output_stream, xact_xdata_(*xact).total, 10);
+ xml_write_value(output_stream, xact->xdata().total, 10);
output_stream << " </total>\n";
}
output_stream << " </xact>\n";
- xact_xdata_(*xact).dflags |= XACT_DISPLAYED;
+ xact->xdata().add_flags(XACT_EXT_DISPLAYED);
}
}