From 8f17d01f5e48ae5097f4cb38d481b00577329b8c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 30 May 2010 02:20:34 -0600 Subject: Added new required item_handler_t::clear() method --- src/output.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/output.h') 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::clear(); + } }; class format_accounts : public item_handler @@ -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::clear(); + } }; class report_accounts : public item_handler @@ -126,6 +140,11 @@ public: virtual void flush(); virtual void operator()(post_t& post); + + virtual void clear() { + accounts.clear(); + item_handler::clear(); + } }; class report_payees : public item_handler @@ -147,6 +166,11 @@ public: virtual void flush(); virtual void operator()(post_t& post); + + virtual void clear() { + payees.clear(); + item_handler::clear(); + } }; class report_commodities : public item_handler @@ -168,6 +192,11 @@ public: virtual void flush(); virtual void operator()(post_t& post); + + virtual void clear() { + commodities.clear(); + item_handler::clear(); + } }; } // namespace ledger -- cgit v1.2.3