(push_to_transactions_list): Added a new transaction handler, which
simply adds the received transactions to a transctions_list container.
This commit is contained in:
parent
bffa2703fc
commit
003464dccc
1 changed files with 14 additions and 0 deletions
14
walk.h
14
walk.h
|
|
@ -154,6 +154,20 @@ class set_account_value : public item_handler<transaction_t>
|
||||||
virtual void operator()(transaction_t& xact);
|
virtual void operator()(transaction_t& xact);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class push_to_transactions_list : public item_handler<transaction_t>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
transactions_list& xact_list;
|
||||||
|
|
||||||
|
push_to_transactions_list(transactions_list& _xact_list,
|
||||||
|
item_handler<transaction_t> * handler = NULL)
|
||||||
|
: item_handler<transaction_t>(handler), xact_list(_xact_list) {}
|
||||||
|
|
||||||
|
virtual void operator()(transaction_t& xact) {
|
||||||
|
xact_list.push_back(&xact);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class sort_transactions : public item_handler<transaction_t>
|
class sort_transactions : public item_handler<transaction_t>
|
||||||
{
|
{
|
||||||
typedef std::deque<transaction_t *> transactions_deque;
|
typedef std::deque<transaction_t *> transactions_deque;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue