summaryrefslogtreecommitdiff
path: root/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-03 22:30:43 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-03 22:30:43 -0400
commit8a21391d0a6d6187855b40530f25b1d8beb0d67a (patch)
tree93243e2aeb44daff01bbea26cf5d5988ad2a8e34 /report.cc
parentbbdab793029f156425180282e0e7a2a7090c1c4a (diff)
downloadledger-8a21391d0a6d6187855b40530f25b1d8beb0d67a.tar.gz
ledger-8a21391d0a6d6187855b40530f25b1d8beb0d67a.tar.bz2
ledger-8a21391d0a6d6187855b40530f25b1d8beb0d67a.zip
Got pre-compiled headers working again, which are used if --devel is passed to
acprep.
Diffstat (limited to 'report.cc')
-rw-r--r--report.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/report.cc b/report.cc
index f250a1c4..f746b3a0 100644
--- a/report.cc
+++ b/report.cc
@@ -463,10 +463,32 @@ void report_t::entry_report(const entry_t& entry, const string& format)
{
}
+value_t report_t::get_amount_expr(call_scope_t& scope)
+{
+ return amount_expr.calc(scope);
+}
+
+value_t report_t::get_total_expr(call_scope_t& scope)
+{
+ return total_expr.calc(scope);
+}
+
expr_t::ptr_op_t report_t::lookup(const string& name)
{
const char * p = name.c_str();
switch (*p) {
+ case 'f':
+ if (std::strncmp(p, "fmt_", 4) == 0) {
+ p = p + 4;
+ switch (*p) {
+ case 't':
+ return MAKE_FUNCTOR(report_t::get_amount_expr);
+ case 'T':
+ return MAKE_FUNCTOR(report_t::get_total_expr);
+ }
+ }
+ break;
+
case 'o':
if (std::strncmp(p, "opt_", 4) == 0) {
p = p + 4;