diff options
author | John Wiegley <johnw@newartisans.com> | 2010-05-30 02:20:34 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-05-30 02:38:30 -0600 |
commit | 8f17d01f5e48ae5097f4cb38d481b00577329b8c (patch) | |
tree | 2db7a0f4b156ec88cf4d785b9d7a4ea2dae60a07 /src/output.h | |
parent | 7ec52d2b395bf4cfc656eef52d72b9d83c1c1523 (diff) | |
download | fork-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.h | 29 |
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 |