summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-07-19 23:29:41 -0500
committerJohn Wiegley <johnw@newartisans.com>2011-07-19 23:29:41 -0500
commitcf35984971341b8a8688eb02a22bcbc1772991d1 (patch)
tree8defec43b26a6cf9a216dac8b41d79504c32ad93 /src/filters.cc
parent966b6fc359bacad6b22e79fd5afbec0ea80e8d6a (diff)
downloadfork-ledger-cf35984971341b8a8688eb02a22bcbc1772991d1.tar.gz
fork-ledger-cf35984971341b8a8688eb02a22bcbc1772991d1.tar.bz2
fork-ledger-cf35984971341b8a8688eb02a22bcbc1772991d1.zip
Use Boost iterator_facade to create new iterators
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 27227ee9..b7e96366 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -83,25 +83,6 @@ void post_splitter::operator()(post_t& post)
}
}
-pass_down_posts::pass_down_posts(post_handler_ptr handler,
- posts_iterator& iter)
- : item_handler<post_t>(handler)
-{
- TRACE_CTOR(pass_down_posts, "post_handler_ptr, posts_iterator");
-
- for (post_t * post = iter(); post; post = iter()) {
- try {
- item_handler<post_t>::operator()(*post);
- }
- catch (const std::exception&) {
- add_error_context(item_context(*post, _("While handling posting")));
- throw;
- }
- }
-
- item_handler<post_t>::flush();
-}
-
void truncate_xacts::flush()
{
if (! posts.size())
@@ -1419,25 +1400,4 @@ void inject_posts::operator()(post_t& post)
item_handler<post_t>::operator()(post);
}
-pass_down_accounts::pass_down_accounts(acct_handler_ptr handler,
- accounts_iterator& iter,
- const optional<predicate_t>& _pred,
- const optional<scope_t&>& _context)
- : item_handler<account_t>(handler), pred(_pred), context(_context)
-{
- TRACE_CTOR(pass_down_accounts, "acct_handler_ptr, accounts_iterator, ...");
-
- for (account_t * account = iter(); account; account = iter()) {
- if (! pred) {
- item_handler<account_t>::operator()(*account);
- } else {
- bind_scope_t bound_scope(*context, *account);
- if ((*pred)(bound_scope))
- item_handler<account_t>::operator()(*account);
- }
- }
-
- item_handler<account_t>::flush();
-}
-
} // namespace ledger