summaryrefslogtreecommitdiff
path: root/src/output.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-03-06 04:05:00 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-03-06 04:07:25 -0400
commitf340d50362340c330de83d419eb41c0ede162c49 (patch)
tree9a30d7bd034c3fa37092725d419f896108536633 /src/output.h
parent4a0f5f9034dc24c7ae5f0464d407f4cf2279558b (diff)
downloadfork-ledger-f340d50362340c330de83d419eb41c0ede162c49.tar.gz
fork-ledger-f340d50362340c330de83d419eb41c0ede162c49.tar.bz2
fork-ledger-f340d50362340c330de83d419eb41c0ede162c49.zip
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.
Diffstat (limited to 'src/output.h')
-rw-r--r--src/output.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/output.h b/src/output.h
index c7e108fe..19dc5e20 100644
--- a/src/output.h
+++ b/src/output.h
@@ -89,52 +89,6 @@ public:
*
* Long.
*/
-class gather_statistics : public item_handler<post_t>
-{
-protected:
- report_t& report;
- xact_t * last_xact;
- post_t * last_post;
-
- struct statistics_t {
- std::set<path> 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<string> accounts_referenced;
- std::set<string> 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
- *
- * Long.
- */
class format_accounts : public item_handler<account_t>
{
protected: