summaryrefslogtreecommitdiff
path: root/src/output.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-05-30 02:20:34 -0600
committerJohn Wiegley <johnw@newartisans.com>2010-05-30 02:38:30 -0600
commit8f17d01f5e48ae5097f4cb38d481b00577329b8c (patch)
tree2db7a0f4b156ec88cf4d785b9d7a4ea2dae60a07 /src/output.h
parent7ec52d2b395bf4cfc656eef52d72b9d83c1c1523 (diff)
downloadfork-ledger-8f17d01f5e48ae5097f4cb38d481b00577329b8c.tar.gz
fork-ledger-8f17d01f5e48ae5097f4cb38d481b00577329b8c.tar.bz2
fork-ledger-8f17d01f5e48ae5097f4cb38d481b00577329b8c.zip
Added new required item_handler_t::clear() method
Diffstat (limited to 'src/output.h')
-rw-r--r--src/output.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/output.h b/src/output.h
index 00c664c1..f0e7f9a5 100644
--- a/src/output.h
+++ b/src/output.h
@@ -75,6 +75,13 @@ public:
virtual void flush();
virtual void operator()(post_t& post);
+
+ virtual void clear() {
+ last_xact = NULL;
+ last_post = NULL;
+
+ item_handler<post_t>::clear();
+ }
};
class format_accounts : public item_handler<account_t>
@@ -105,6 +112,13 @@ public:
virtual void flush();
virtual void operator()(account_t& account);
+
+ virtual void clear() {
+ disp_pred.mark_uncompiled();
+ posted_accounts.clear();
+
+ item_handler<account_t>::clear();
+ }
};
class report_accounts : public item_handler<post_t>
@@ -126,6 +140,11 @@ public:
virtual void flush();
virtual void operator()(post_t& post);
+
+ virtual void clear() {
+ accounts.clear();
+ item_handler<post_t>::clear();
+ }
};
class report_payees : public item_handler<post_t>
@@ -147,6 +166,11 @@ public:
virtual void flush();
virtual void operator()(post_t& post);
+
+ virtual void clear() {
+ payees.clear();
+ item_handler<post_t>::clear();
+ }
};
class report_commodities : public item_handler<post_t>
@@ -168,6 +192,11 @@ public:
virtual void flush();
virtual void operator()(post_t& post);
+
+ virtual void clear() {
+ commodities.clear();
+ item_handler<post_t>::clear();
+ }
};
} // namespace ledger