From f340d50362340c330de83d419eb41c0ede162c49 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 6 Mar 2009 04:05:00 -0400 Subject: Revised the ways statistics are computed It is no longer done in calc_posts, but recursively on each account. This allows value expressions to ask statistical questions, like "earliest cleared posting?" (TBD) from any specific account, computed lazily. --- src/output.h | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/output.h') diff --git a/src/output.h b/src/output.h index c7e108fe..19dc5e20 100644 --- a/src/output.h +++ b/src/output.h @@ -84,52 +84,6 @@ public: virtual void operator()(post_t& post); }; -/** - * @brief Brief - * - * Long. - */ -class gather_statistics : public item_handler -{ -protected: - report_t& report; - xact_t * last_xact; - post_t * last_post; - - struct statistics_t { - std::set filenames; - - std::size_t total_xacts; - std::size_t total_posts; - std::size_t total_uncleared_posts; - std::size_t total_last_7_days; - std::size_t total_last_30_days; - std::size_t total_this_month; - - date_t earliest_post; - date_t latest_post; - - std::set accounts_referenced; - std::set payees_referenced; - - statistics_t() - : total_xacts(0), total_posts(0), total_uncleared_posts(0), - total_last_7_days(0), total_last_30_days(0), total_this_month(0) {} - } statistics; - -public: - gather_statistics(report_t& _report) - : report(_report), last_xact(NULL), last_post(NULL) { - TRACE_CTOR(gather_statistics, "report&"); - } - virtual ~gather_statistics() { - TRACE_DTOR(gather_statistics); - } - - virtual void flush(); - virtual void operator()(post_t& post); -}; - /** * @brief Brief * -- cgit v1.2.3