Added new required item_handler_t::clear() method
This commit is contained in:
parent
7ec52d2b39
commit
8f17d01f5e
6 changed files with 227 additions and 34 deletions
|
|
@ -75,6 +75,11 @@ public:
|
||||||
(*handler.get())(item);
|
(*handler.get())(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
if (handler)
|
||||||
|
handler->clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef shared_ptr<item_handler<post_t> > post_handler_ptr;
|
typedef shared_ptr<item_handler<post_t> > post_handler_ptr;
|
||||||
|
|
|
||||||
164
src/filters.h
164
src/filters.h
|
|
@ -88,6 +88,11 @@ public:
|
||||||
virtual void operator()(post_t& post) {
|
virtual void operator()(post_t& post) {
|
||||||
posts.push_back(&post);
|
posts.push_back(&post);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
posts.clear();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class posts_iterator;
|
class posts_iterator;
|
||||||
|
|
@ -149,6 +154,15 @@ public:
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
completed = false;
|
||||||
|
posts.clear();
|
||||||
|
xacts_seen = 0;
|
||||||
|
last_xact = NULL;
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class sort_posts : public item_handler<post_t>
|
class sort_posts : public item_handler<post_t>
|
||||||
|
|
@ -156,20 +170,18 @@ class sort_posts : public item_handler<post_t>
|
||||||
typedef std::deque<post_t *> posts_deque;
|
typedef std::deque<post_t *> posts_deque;
|
||||||
|
|
||||||
posts_deque posts;
|
posts_deque posts;
|
||||||
const expr_t sort_order;
|
expr_t sort_order;
|
||||||
|
|
||||||
sort_posts();
|
sort_posts();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
sort_posts(post_handler_ptr handler,
|
sort_posts(post_handler_ptr handler, const expr_t& _sort_order)
|
||||||
const expr_t& _sort_order)
|
|
||||||
: item_handler<post_t>(handler),
|
: item_handler<post_t>(handler),
|
||||||
sort_order(_sort_order) {
|
sort_order(_sort_order) {
|
||||||
TRACE_CTOR(sort_posts,
|
TRACE_CTOR(sort_posts,
|
||||||
"post_handler_ptr, const value_expr&");
|
"post_handler_ptr, const value_expr&");
|
||||||
}
|
}
|
||||||
sort_posts(post_handler_ptr handler,
|
sort_posts(post_handler_ptr handler, const string& _sort_order)
|
||||||
const string& _sort_order)
|
|
||||||
: item_handler<post_t>(handler),
|
: item_handler<post_t>(handler),
|
||||||
sort_order(_sort_order) {
|
sort_order(_sort_order) {
|
||||||
TRACE_CTOR(sort_posts,
|
TRACE_CTOR(sort_posts,
|
||||||
|
|
@ -189,6 +201,13 @@ public:
|
||||||
virtual void operator()(post_t& post) {
|
virtual void operator()(post_t& post) {
|
||||||
posts.push_back(&post);
|
posts.push_back(&post);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
posts.clear();
|
||||||
|
sort_order.mark_uncompiled();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class sort_xacts : public item_handler<post_t>
|
class sort_xacts : public item_handler<post_t>
|
||||||
|
|
@ -199,14 +218,12 @@ class sort_xacts : public item_handler<post_t>
|
||||||
sort_xacts();
|
sort_xacts();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
sort_xacts(post_handler_ptr handler,
|
sort_xacts(post_handler_ptr handler, const expr_t& _sort_order)
|
||||||
const expr_t& _sort_order)
|
|
||||||
: sorter(handler, _sort_order) {
|
: sorter(handler, _sort_order) {
|
||||||
TRACE_CTOR(sort_xacts,
|
TRACE_CTOR(sort_xacts,
|
||||||
"post_handler_ptr, const value_expr&");
|
"post_handler_ptr, const value_expr&");
|
||||||
}
|
}
|
||||||
sort_xacts(post_handler_ptr handler,
|
sort_xacts(post_handler_ptr handler, const string& _sort_order)
|
||||||
const string& _sort_order)
|
|
||||||
: sorter(handler, _sort_order) {
|
: sorter(handler, _sort_order) {
|
||||||
TRACE_CTOR(sort_xacts,
|
TRACE_CTOR(sort_xacts,
|
||||||
"post_handler_ptr, const string&");
|
"post_handler_ptr, const string&");
|
||||||
|
|
@ -228,6 +245,13 @@ public:
|
||||||
|
|
||||||
last_xact = post.xact;
|
last_xact = post.xact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
sorter.clear();
|
||||||
|
last_xact = NULL;
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class filter_posts : public item_handler<post_t>
|
class filter_posts : public item_handler<post_t>
|
||||||
|
|
@ -255,6 +279,11 @@ public:
|
||||||
(*handler)(post);
|
(*handler)(post);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
pred.mark_uncompiled();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class anonymize_posts : public item_handler<post_t>
|
class anonymize_posts : public item_handler<post_t>
|
||||||
|
|
@ -274,6 +303,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
temps.clear();
|
||||||
|
last_xact = NULL;
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class calc_posts : public item_handler<post_t>
|
class calc_posts : public item_handler<post_t>
|
||||||
|
|
@ -297,6 +333,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
last_post = NULL;
|
||||||
|
amount_expr.mark_uncompiled();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class collapse_posts : public item_handler<post_t>
|
class collapse_posts : public item_handler<post_t>
|
||||||
|
|
@ -341,6 +384,22 @@ public:
|
||||||
void report_subtotal();
|
void report_subtotal();
|
||||||
|
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
amount_expr.mark_uncompiled();
|
||||||
|
display_predicate.mark_uncompiled();
|
||||||
|
only_predicate.mark_uncompiled();
|
||||||
|
|
||||||
|
subtotal = value_t();
|
||||||
|
count = 0;
|
||||||
|
last_xact = NULL;
|
||||||
|
last_post = NULL;
|
||||||
|
|
||||||
|
temps.clear();
|
||||||
|
component_posts.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class related_posts : public item_handler<post_t>
|
class related_posts : public item_handler<post_t>
|
||||||
|
|
@ -367,6 +426,11 @@ public:
|
||||||
post.xdata().add_flags(POST_EXT_RECEIVED);
|
post.xdata().add_flags(POST_EXT_RECEIVED);
|
||||||
posts.push_back(&post);
|
posts.push_back(&post);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
posts.clear();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class changed_value_posts : public item_handler<post_t>
|
class changed_value_posts : public item_handler<post_t>
|
||||||
|
|
@ -410,6 +474,20 @@ public:
|
||||||
void output_rounding(post_t& post);
|
void output_rounding(post_t& post);
|
||||||
|
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
display_amount_expr.mark_uncompiled();
|
||||||
|
total_expr.mark_uncompiled();
|
||||||
|
display_total_expr.mark_uncompiled();
|
||||||
|
|
||||||
|
last_post = NULL;
|
||||||
|
last_total = value_t();
|
||||||
|
last_display_total = value_t();
|
||||||
|
|
||||||
|
temps.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class subtotal_posts : public item_handler<post_t>
|
class subtotal_posts : public item_handler<post_t>
|
||||||
|
|
@ -471,10 +549,20 @@ public:
|
||||||
item_handler<post_t>::flush();
|
item_handler<post_t>::flush();
|
||||||
}
|
}
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
amount_expr.mark_uncompiled();
|
||||||
|
values.clear();
|
||||||
|
temps.clear();
|
||||||
|
component_posts.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class interval_posts : public subtotal_posts
|
class interval_posts : public subtotal_posts
|
||||||
{
|
{
|
||||||
|
date_interval_t start_interval;
|
||||||
date_interval_t interval;
|
date_interval_t interval;
|
||||||
date_interval_t last_interval;
|
date_interval_t last_interval;
|
||||||
post_t * last_post;
|
post_t * last_post;
|
||||||
|
|
@ -491,8 +579,9 @@ public:
|
||||||
const date_interval_t& _interval,
|
const date_interval_t& _interval,
|
||||||
bool _exact_periods = false,
|
bool _exact_periods = false,
|
||||||
bool _generate_empty_posts = false)
|
bool _generate_empty_posts = false)
|
||||||
: subtotal_posts(_handler, amount_expr), interval(_interval),
|
: subtotal_posts(_handler, amount_expr), start_interval(_interval),
|
||||||
last_post(NULL), empty_account(temps.create_account(_("<None>"))),
|
interval(start_interval), last_post(NULL),
|
||||||
|
empty_account(temps.create_account(_("<None>"))),
|
||||||
exact_periods(_exact_periods),
|
exact_periods(_exact_periods),
|
||||||
generate_empty_posts(_generate_empty_posts) {
|
generate_empty_posts(_generate_empty_posts) {
|
||||||
TRACE_CTOR(interval_posts,
|
TRACE_CTOR(interval_posts,
|
||||||
|
|
@ -512,6 +601,14 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
interval = start_interval;
|
||||||
|
last_interval = date_interval_t();
|
||||||
|
last_post = NULL;
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class posts_as_equity : public subtotal_posts
|
class posts_as_equity : public subtotal_posts
|
||||||
|
|
@ -539,6 +636,11 @@ public:
|
||||||
report_subtotal();
|
report_subtotal();
|
||||||
subtotal_posts::flush();
|
subtotal_posts::flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
last_post = NULL;
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class by_payee_posts : public item_handler<post_t>
|
class by_payee_posts : public item_handler<post_t>
|
||||||
|
|
@ -562,6 +664,13 @@ class by_payee_posts : public item_handler<post_t>
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
amount_expr.mark_uncompiled();
|
||||||
|
payee_subtotals.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class transfer_details : public item_handler<post_t>
|
class transfer_details : public item_handler<post_t>
|
||||||
|
|
@ -595,6 +704,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
expr.mark_uncompiled();
|
||||||
|
temps.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class dow_posts : public subtotal_posts
|
class dow_posts : public subtotal_posts
|
||||||
|
|
@ -616,6 +732,13 @@ public:
|
||||||
virtual void operator()(post_t& post) {
|
virtual void operator()(post_t& post) {
|
||||||
days_of_the_week[post.date().day_of_week()].push_back(&post);
|
days_of_the_week[post.date().day_of_week()].push_back(&post);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
for (int i = 0; i < 7; i++)
|
||||||
|
days_of_the_week[i].clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class generate_posts : public item_handler<post_t>
|
class generate_posts : public item_handler<post_t>
|
||||||
|
|
@ -642,6 +765,13 @@ public:
|
||||||
void add_period_xacts(period_xacts_list& period_xacts);
|
void add_period_xacts(period_xacts_list& period_xacts);
|
||||||
|
|
||||||
virtual void add_post(const date_interval_t& period, post_t& post);
|
virtual void add_post(const date_interval_t& period, post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
pending_posts.clear();
|
||||||
|
temps.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class budget_posts : public generate_posts
|
class budget_posts : public generate_posts
|
||||||
|
|
@ -692,6 +822,11 @@ class forecast_posts : public generate_posts
|
||||||
|
|
||||||
virtual void add_post(const date_interval_t& period, post_t& post);
|
virtual void add_post(const date_interval_t& period, post_t& post);
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
pred.mark_uncompiled();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -717,6 +852,13 @@ public:
|
||||||
virtual ~pass_down_accounts() {
|
virtual ~pass_down_accounts() {
|
||||||
TRACE_DTOR(pass_down_accounts);
|
TRACE_DTOR(pass_down_accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
if (pred)
|
||||||
|
pred->mark_uncompiled();
|
||||||
|
|
||||||
|
item_handler<account_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
29
src/output.h
29
src/output.h
|
|
@ -75,6 +75,13 @@ public:
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
last_xact = NULL;
|
||||||
|
last_post = NULL;
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class format_accounts : public item_handler<account_t>
|
class format_accounts : public item_handler<account_t>
|
||||||
|
|
@ -105,6 +112,13 @@ public:
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
|
|
||||||
virtual void operator()(account_t& account);
|
virtual void operator()(account_t& account);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
disp_pred.mark_uncompiled();
|
||||||
|
posted_accounts.clear();
|
||||||
|
|
||||||
|
item_handler<account_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class report_accounts : public item_handler<post_t>
|
class report_accounts : public item_handler<post_t>
|
||||||
|
|
@ -126,6 +140,11 @@ public:
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
accounts.clear();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class report_payees : public item_handler<post_t>
|
class report_payees : public item_handler<post_t>
|
||||||
|
|
@ -147,6 +166,11 @@ public:
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
payees.clear();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class report_commodities : public item_handler<post_t>
|
class report_commodities : public item_handler<post_t>
|
||||||
|
|
@ -168,6 +192,11 @@ public:
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
commodities.clear();
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
45
src/temps.cc
45
src/temps.cc
|
|
@ -38,26 +38,6 @@
|
||||||
|
|
||||||
namespace ledger {
|
namespace ledger {
|
||||||
|
|
||||||
temporaries_t::~temporaries_t()
|
|
||||||
{
|
|
||||||
if (post_temps) {
|
|
||||||
foreach (post_t& post, *post_temps) {
|
|
||||||
if (! post.xact->has_flags(ITEM_TEMP))
|
|
||||||
post.xact->remove_post(&post);
|
|
||||||
|
|
||||||
if (post.account && ! post.account->has_flags(ACCOUNT_TEMP))
|
|
||||||
post.account->remove_post(&post);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (acct_temps) {
|
|
||||||
foreach (account_t& acct, *acct_temps) {
|
|
||||||
if (acct.parent && ! acct.parent->has_flags(ACCOUNT_TEMP))
|
|
||||||
acct.parent->remove_account(&acct);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xact_t& temporaries_t::copy_xact(xact_t& origin)
|
xact_t& temporaries_t::copy_xact(xact_t& origin)
|
||||||
{
|
{
|
||||||
if (! xact_temps)
|
if (! xact_temps)
|
||||||
|
|
@ -134,4 +114,29 @@ account_t& temporaries_t::create_account(const string& name,
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void temporaries_t::clear()
|
||||||
|
{
|
||||||
|
if (post_temps) {
|
||||||
|
foreach (post_t& post, *post_temps) {
|
||||||
|
if (! post.xact->has_flags(ITEM_TEMP))
|
||||||
|
post.xact->remove_post(&post);
|
||||||
|
|
||||||
|
if (post.account && ! post.account->has_flags(ACCOUNT_TEMP))
|
||||||
|
post.account->remove_post(&post);
|
||||||
|
}
|
||||||
|
post_temps->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xact_temps)
|
||||||
|
xact_temps->clear();
|
||||||
|
|
||||||
|
if (acct_temps) {
|
||||||
|
foreach (account_t& acct, *acct_temps) {
|
||||||
|
if (acct.parent && ! acct.parent->has_flags(ACCOUNT_TEMP))
|
||||||
|
acct.parent->remove_account(&acct);
|
||||||
|
}
|
||||||
|
acct_temps->clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,9 @@ class temporaries_t
|
||||||
optional<std::list<account_t> > acct_temps;
|
optional<std::list<account_t> > acct_temps;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~temporaries_t();
|
~temporaries_t() {
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
xact_t& copy_xact(xact_t& origin);
|
xact_t& copy_xact(xact_t& origin);
|
||||||
xact_t& create_xact();
|
xact_t& create_xact();
|
||||||
|
|
@ -69,6 +71,8 @@ public:
|
||||||
account_t& last_account() {
|
account_t& last_account() {
|
||||||
return acct_temps->back();
|
return acct_temps->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,14 @@ public:
|
||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
virtual void operator()(post_t& post);
|
virtual void operator()(post_t& post);
|
||||||
|
|
||||||
|
virtual void clear() {
|
||||||
|
commodities.clear();
|
||||||
|
transactions_set.clear();
|
||||||
|
transactions.clear();
|
||||||
|
|
||||||
|
item_handler<post_t>::clear();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue