summaryrefslogtreecommitdiff
path: root/src/chain.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-08 23:40:42 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-09 02:06:06 -0500
commitc3535d06c89732a0ba4c13274702b0f48198ae79 (patch)
tree5a8153d4c627cc3c7eff687b50a59a1cc9c3d04a /src/chain.cc
parent523d4243e8c347cb7cbd1f68b03a5098ceb73b70 (diff)
downloadfork-ledger-c3535d06c89732a0ba4c13274702b0f48198ae79.tar.gz
fork-ledger-c3535d06c89732a0ba4c13274702b0f48198ae79.tar.bz2
fork-ledger-c3535d06c89732a0ba4c13274702b0f48198ae79.zip
Redesigned the expr_t, predicate_t, query_t classes
Diffstat (limited to 'src/chain.cc')
-rw-r--r--src/chain.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/chain.cc b/src/chain.cc
index 4a3a2343..5839bd9e 100644
--- a/src/chain.cc
+++ b/src/chain.cc
@@ -44,8 +44,8 @@ post_handler_ptr chain_post_handlers(report_t& report,
bool only_preliminaries)
{
post_handler_ptr handler(base_handler);
- item_predicate display_predicate;
- item_predicate only_predicate;
+ predicate_t display_predicate;
+ predicate_t only_predicate;
assert(report.HANDLED(amount_));
expr_t& expr(report.HANDLER(amount_).expr);
@@ -55,8 +55,8 @@ post_handler_ptr chain_post_handlers(report_t& report,
// Make sure only forecast postings which match are allowed through
if (report.HANDLED(forecast_while_)) {
handler.reset(new filter_posts
- (handler, item_predicate(report.HANDLER(forecast_while_).str(),
- report.what_to_keep()),
+ (handler, predicate_t(report.HANDLER(forecast_while_).str(),
+ report.what_to_keep()),
report));
}
@@ -73,8 +73,8 @@ post_handler_ptr chain_post_handlers(report_t& report,
// filter_posts will only pass through posts matching the
// `display_predicate'.
if (report.HANDLED(display_)) {
- display_predicate = item_predicate(report.HANDLER(display_).str(),
- report.what_to_keep());
+ display_predicate = predicate_t(report.HANDLER(display_).str(),
+ report.what_to_keep());
handler.reset(new filter_posts(handler, display_predicate, report));
}
@@ -100,8 +100,8 @@ post_handler_ptr chain_post_handlers(report_t& report,
// filter_posts will only pass through posts matching the
// `secondary_predicate'.
if (report.HANDLED(only_)) {
- only_predicate = item_predicate(report.HANDLER(only_).str(),
- report.what_to_keep());
+ only_predicate = predicate_t(report.HANDLER(only_).str(),
+ report.what_to_keep());
handler.reset(new filter_posts(handler, only_predicate, report));
}
@@ -187,8 +187,8 @@ post_handler_ptr chain_post_handlers(report_t& report,
DEBUG("report.predicate",
"Report predicate expression = " << report.HANDLER(limit_).str());
handler.reset(new filter_posts
- (handler, item_predicate(report.HANDLER(limit_).str(),
- report.what_to_keep()),
+ (handler, predicate_t(report.HANDLER(limit_).str(),
+ report.what_to_keep()),
report));
}
@@ -211,15 +211,15 @@ post_handler_ptr chain_post_handlers(report_t& report,
// the filter get reported.
if (report.HANDLED(limit_))
handler.reset(new filter_posts
- (handler, item_predicate(report.HANDLER(limit_).str(),
- report.what_to_keep()),
+ (handler, predicate_t(report.HANDLER(limit_).str(),
+ report.what_to_keep()),
report));
}
else if (report.HANDLED(forecast_while_)) {
forecast_posts * forecast_handler
= new forecast_posts(handler,
- item_predicate(report.HANDLER(forecast_while_).str(),
- report.what_to_keep()),
+ predicate_t(report.HANDLER(forecast_while_).str(),
+ report.what_to_keep()),
report,
report.HANDLED(forecast_years_) ?
static_cast<std::size_t>
@@ -231,8 +231,8 @@ post_handler_ptr chain_post_handlers(report_t& report,
// See above, under budget_posts.
if (report.HANDLED(limit_))
handler.reset(new filter_posts
- (handler, item_predicate(report.HANDLER(limit_).str(),
- report.what_to_keep()),
+ (handler, predicate_t(report.HANDLER(limit_).str(),
+ report.what_to_keep()),
report));
}