diff options
author | Rahix <rahix@rahix.de> | 2020-05-12 18:41:33 +0200 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2020-07-21 14:50:01 -0700 |
commit | f1e8a0a42f9b0d2b11201a2b67bea6f60e37c76f (patch) | |
tree | 229cbeb40aab69a3889e479e6a8477baa495acdd /src/filters.h | |
parent | 5e10e0c94aa764e3933e19bd40b7cd35ff6d37f0 (diff) | |
download | fork-ledger-f1e8a0a42f9b0d2b11201a2b67bea6f60e37c76f.tar.gz fork-ledger-f1e8a0a42f9b0d2b11201a2b67bea6f60e37c76f.tar.bz2 fork-ledger-f1e8a0a42f9b0d2b11201a2b67bea6f60e37c76f.zip |
collapse_posts: Add a collapse_depth attribute
Replace the hardcoded depth of 3 with a class attribute that can later
be set from a commandline argument.
Diffstat (limited to 'src/filters.h')
-rw-r--r-- | src/filters.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filters.h b/src/filters.h index 40e25ac0..be2e0e84 100644 --- a/src/filters.h +++ b/src/filters.h @@ -439,6 +439,7 @@ class collapse_posts : public item_handler<post_t> temporaries_t temps; totals_map totals; bool only_collapse_if_zero; + unsigned short collapse_depth; std::list<post_t *> component_posts; report_t& report; @@ -450,12 +451,14 @@ public: expr_t& _amount_expr, predicate_t _display_predicate, predicate_t _only_predicate, - bool _only_collapse_if_zero = false) + bool _only_collapse_if_zero = false, + unsigned short _collapse_depth = 0) : item_handler<post_t>(handler), amount_expr(_amount_expr), display_predicate(_display_predicate), only_predicate(_only_predicate), count(0), last_xact(NULL), last_post(NULL), - only_collapse_if_zero(_only_collapse_if_zero), report(_report) { + only_collapse_if_zero(_only_collapse_if_zero), + collapse_depth(_collapse_depth), report(_report) { TRACE_CTOR(collapse_posts, "post_handler_ptr, ..."); } virtual ~collapse_posts() { |