From f570e6644fce27b612562282b11d00fd0691873d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 31 Jul 2004 07:42:34 -0400 Subject: brought back the "print" and "equity" reports; this time much better! --- format.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'format.h') diff --git a/format.h b/format.h index 12af7d8e..f2bdad10 100644 --- a/format.h +++ b/format.h @@ -16,9 +16,12 @@ struct element_t STRING, VALUE_EXPR, DATE_STRING, + CLEARED, + CODE, PAYEE, ACCOUNT_NAME, ACCOUNT_FULLNAME, + OPT_AMOUNT, VALUE, TOTAL, SPACER @@ -47,8 +50,8 @@ struct format_t { element_t * elements; - static node_t * value_expr; - static node_t * total_expr; + static std::auto_ptr value_expr; + static std::auto_ptr total_expr; format_t(const std::string& _format) { elements = parse_elements(_format); @@ -63,10 +66,10 @@ struct format_t const item_t * displayed_parent = NULL) const; static balance_t compute_value(const item_t * item) { - return value_expr ? value_expr->compute(item) : balance_t(); + return value_expr.get() ? value_expr->compute(item) : balance_t(); } static balance_t compute_total(const item_t * item) { - return total_expr ? total_expr->compute(item) : balance_t(); + return total_expr.get() ? total_expr->compute(item) : balance_t(); } }; -- cgit v1.2.3