From 003464dccc70e34a9486ca1aff0d536c15cf0a90 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 9 Feb 2005 21:06:12 +0000 Subject: (push_to_transactions_list): Added a new transaction handler, which simply adds the received transactions to a transctions_list container. --- walk.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/walk.h b/walk.h index dbc286ce..871a9639 100644 --- a/walk.h +++ b/walk.h @@ -154,6 +154,20 @@ class set_account_value : public item_handler virtual void operator()(transaction_t& xact); }; +class push_to_transactions_list : public item_handler +{ + public: + transactions_list& xact_list; + + push_to_transactions_list(transactions_list& _xact_list, + item_handler * handler = NULL) + : item_handler(handler), xact_list(_xact_list) {} + + virtual void operator()(transaction_t& xact) { + xact_list.push_back(&xact); + } +}; + class sort_transactions : public item_handler { typedef std::deque transactions_deque; -- cgit v1.2.3