Removed an unused class: format_entries

This commit is contained in:
John Wiegley 2009-02-21 19:22:55 -04:00
parent 20a3ba0d21
commit dc63429785
4 changed files with 4 additions and 60 deletions

View file

@ -179,37 +179,6 @@ void gather_statistics::operator()(xact_t& xact)
}
}
void format_entries::format_last_entry()
{
bool first = true;
std::ostream& out(report.output_stream);
foreach (xact_t * xact, last_entry->xacts) {
if (xact->has_xdata() &&
xact->xdata().has_flags(XACT_EXT_TO_DISPLAY)) {
if (first) {
bind_scope_t bound_scope(report, *xact);
first_line_format.format(out, bound_scope);
first = false;
} else {
bind_scope_t bound_scope(report, *xact);
next_lines_format.format(out, bound_scope);
}
xact->xdata().add_flags(XACT_EXT_DISPLAYED);
}
}
}
void format_entries::operator()(xact_t& xact)
{
xact.xdata().add_flags(XACT_EXT_TO_DISPLAY);
if (last_entry && xact.entry != last_entry)
format_last_entry();
last_entry = xact.entry;
}
void format_accounts::post_account(account_t& account)
{
bind_scope_t bound_scope(report, account);

View file

@ -124,34 +124,6 @@ public:
virtual void operator()(xact_t& xact);
};
/**
* @brief Brief
*
* Long.
*/
class format_entries : public format_xacts
{
public:
format_entries(report_t& _report, const string& format)
: format_xacts(_report, format) {
TRACE_CTOR(format_entries, "report_t&, const string&");
}
virtual ~format_entries() {
TRACE_DTOR(format_entries);
}
virtual void format_last_entry();
virtual void flush() {
if (last_entry) {
format_last_entry();
last_entry = NULL;
}
format_xacts::flush();
}
virtual void operator()(xact_t& xact);
};
/**
* @brief Brief
*

View file

@ -436,7 +436,8 @@ option_t<report_t> * report_t::lookup_option(const char * p)
else OPT(quarterly);
break;
case 'r':
OPT(real);
OPT(raw);
else OPT(real);
else OPT(register_format_);
else OPT_(related);
else OPT(related_all);

View file

@ -487,6 +487,8 @@ public:
parent->HANDLER(period_).on("quarterly");
});
OPTION(report_t, raw);
OPTION_(report_t, real, DO() { // -R
parent->HANDLER(limit_).on("real");
});