diff options
author | johannes@debussy <johannes@debussy> | 2013-11-05 15:58:52 +0100 |
---|---|---|
committer | johannes@debussy <johannes@debussy> | 2013-11-05 15:58:52 +0100 |
commit | a2d29dda5f514b84b503037195ca8a79a7969f7d (patch) | |
tree | f3d93569fa57d7ff63f28661587b5f55dd7f98a0 /src/filters.h | |
parent | 71f1adad647d5ec4f2e69970543758d7f49f1340 (diff) | |
download | fork-ledger-a2d29dda5f514b84b503037195ca8a79a7969f7d.tar.gz fork-ledger-a2d29dda5f514b84b503037195ca8a79a7969f7d.tar.bz2 fork-ledger-a2d29dda5f514b84b503037195ca8a79a7969f7d.zip |
first implementation of --depth for register
Diffstat (limited to 'src/filters.h')
-rw-r--r-- | src/filters.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/filters.h b/src/filters.h index f05ddaa1..d6e1b6fc 100644 --- a/src/filters.h +++ b/src/filters.h @@ -421,18 +421,21 @@ public: class collapse_posts : public item_handler<post_t> { - expr_t& amount_expr; - predicate_t display_predicate; - predicate_t only_predicate; - value_t subtotal; - std::size_t count; - xact_t * last_xact; - post_t * last_post; - temporaries_t temps; - std::map<string,account_t *> totals_accounts; - bool only_collapse_if_zero; - std::list<post_t *> component_posts; - report_t& report; + + typedef std::map<string,value_t> totals_map; + + expr_t& amount_expr; + predicate_t display_predicate; + predicate_t only_predicate; + value_t subtotal; + std::size_t count; + xact_t * last_xact; + post_t * last_post; + temporaries_t temps; + totals_map totals; + bool only_collapse_if_zero; + std::list<post_t *> component_posts; + report_t& report; collapse_posts(); @@ -454,7 +457,7 @@ public: TRACE_DTOR(collapse_posts); handler.reset(); } - account_t* find_totals_account(account_t* account); + value_t& find_totals(account_t* account); virtual void flush() { report_subtotal(); @@ -476,7 +479,7 @@ public: last_post = NULL; temps.clear(); - totals_accounts.clear(); + totals.clear(); component_posts.clear(); item_handler<post_t>::clear(); |