Changed how some of the filters are constructed
This commit is contained in:
parent
65b3a778e2
commit
d0dfff62a6
2 changed files with 12 additions and 15 deletions
|
|
@ -524,14 +524,11 @@ display_filter_posts::display_filter_posts(post_handler_ptr handler,
|
||||||
report_t& _report,
|
report_t& _report,
|
||||||
bool _show_rounding)
|
bool _show_rounding)
|
||||||
: item_handler<post_t>(handler), report(_report),
|
: item_handler<post_t>(handler), report(_report),
|
||||||
|
display_amount_expr(report.HANDLER(display_amount_).expr),
|
||||||
|
display_total_expr(report.HANDLER(display_total_).expr),
|
||||||
show_rounding(_show_rounding)
|
show_rounding(_show_rounding)
|
||||||
{
|
{
|
||||||
TRACE_CTOR(display_filter_posts,
|
TRACE_CTOR(display_filter_posts, "post_handler_ptr, report_t&, bool");
|
||||||
"post_handler_ptr, report_t&, account_t&, bool");
|
|
||||||
|
|
||||||
display_amount_expr = report.HANDLER(display_amount_).expr;
|
|
||||||
display_total_expr = report.HANDLER(display_total_).expr;
|
|
||||||
|
|
||||||
create_accounts();
|
create_accounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -607,17 +604,17 @@ changed_value_posts::changed_value_posts
|
||||||
bool _show_unrealized,
|
bool _show_unrealized,
|
||||||
display_filter_posts * _display_filter)
|
display_filter_posts * _display_filter)
|
||||||
: item_handler<post_t>(handler), report(_report),
|
: item_handler<post_t>(handler), report(_report),
|
||||||
|
total_expr(report.HANDLED(revalued_total_) ?
|
||||||
|
report.HANDLER(revalued_total_).expr :
|
||||||
|
report.HANDLER(display_total_).expr),
|
||||||
|
display_total_expr(report.HANDLER(display_total_).expr),
|
||||||
|
changed_values_only(report.HANDLED(revalued_only)),
|
||||||
for_accounts_report(_for_accounts_report),
|
for_accounts_report(_for_accounts_report),
|
||||||
show_unrealized(_show_unrealized), last_post(NULL),
|
show_unrealized(_show_unrealized), last_post(NULL),
|
||||||
display_filter(_display_filter)
|
display_filter(_display_filter)
|
||||||
{
|
{
|
||||||
TRACE_CTOR(changed_value_posts, "post_handler_ptr, report_t&, bool");
|
TRACE_CTOR(changed_value_posts,
|
||||||
|
"post_handler_ptr, report_t&, bool, bool, display_filter_posts *");
|
||||||
total_expr = (report.HANDLED(revalued_total_) ?
|
|
||||||
report.HANDLER(revalued_total_).expr :
|
|
||||||
report.HANDLER(display_total_).expr);
|
|
||||||
display_total_expr = report.HANDLER(display_total_).expr;
|
|
||||||
changed_values_only = report.HANDLED(revalued_only);
|
|
||||||
|
|
||||||
string gains_equity_account_name;
|
string gains_equity_account_name;
|
||||||
if (report.HANDLED(unrealized_gains_))
|
if (report.HANDLED(unrealized_gains_))
|
||||||
|
|
|
||||||
|
|
@ -506,9 +506,9 @@ class display_filter_posts : public item_handler<post_t>
|
||||||
// This filter requires that calc_posts be used at some point
|
// This filter requires that calc_posts be used at some point
|
||||||
// later in the chain.
|
// later in the chain.
|
||||||
|
|
||||||
|
report_t& report;
|
||||||
expr_t display_amount_expr;
|
expr_t display_amount_expr;
|
||||||
expr_t display_total_expr;
|
expr_t display_total_expr;
|
||||||
report_t& report;
|
|
||||||
bool show_rounding;
|
bool show_rounding;
|
||||||
value_t last_display_total;
|
value_t last_display_total;
|
||||||
temporaries_t temps;
|
temporaries_t temps;
|
||||||
|
|
@ -554,9 +554,9 @@ class changed_value_posts : public item_handler<post_t>
|
||||||
// This filter requires that calc_posts be used at some point
|
// This filter requires that calc_posts be used at some point
|
||||||
// later in the chain.
|
// later in the chain.
|
||||||
|
|
||||||
|
report_t& report;
|
||||||
expr_t total_expr;
|
expr_t total_expr;
|
||||||
expr_t display_total_expr;
|
expr_t display_total_expr;
|
||||||
report_t& report;
|
|
||||||
bool changed_values_only;
|
bool changed_values_only;
|
||||||
bool for_accounts_report;
|
bool for_accounts_report;
|
||||||
bool show_unrealized;
|
bool show_unrealized;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue