summaryrefslogtreecommitdiff
path: root/src/post.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-14 20:43:28 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-14 20:43:28 -0500
commitbadbeb545b9e700e6656dfbc348bfe1387cb2ffa (patch)
tree26237a150367e13a24917d994602f5f94f979ec8 /src/post.cc
parent73baf9cd727407f6e47b410bbde3b4bcad482ae3 (diff)
parent8d698e5ccb471d546eee8a5bea6d6c56ec4b08c3 (diff)
downloadfork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.tar.gz
fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.tar.bz2
fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.zip
Merge branch 'next'
Diffstat (limited to 'src/post.cc')
-rw-r--r--src/post.cc28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/post.cc b/src/post.cc
index 7c27b6c4..34284e1b 100644
--- a/src/post.cc
+++ b/src/post.cc
@@ -297,6 +297,11 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind,
return WRAP_FUNCTOR(get_wrapper<&get_account_base>);
break;
+ case 'b':
+ if (name[1] == '\0')
+ return WRAP_FUNCTOR(get_wrapper<&get_cost>);
+ break;
+
case 'c':
if (name == "code")
return WRAP_FUNCTOR(get_wrapper<&get_code>);
@@ -325,7 +330,9 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind,
break;
case 'i':
- if (name == "id")
+ if (name == "index")
+ return WRAP_FUNCTOR(get_wrapper<&get_count>);
+ else if (name == "id")
return WRAP_FUNCTOR(get_wrapper<&get_id>);
else if (name == "idstring")
return WRAP_FUNCTOR(get_wrapper<&get_idstring>);
@@ -339,6 +346,8 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind,
case 'n':
if (name == "note")
return WRAP_FUNCTOR(get_wrapper<&get_note>);
+ else if (name[1] == '\0')
+ return WRAP_FUNCTOR(get_wrapper<&get_count>);
break;
case 'p':
@@ -358,7 +367,7 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind,
break;
case 't':
- if (name[1] == '\0' || name == "total")
+ if (name == "total")
return WRAP_FUNCTOR(get_wrapper<&get_total>);
break;
@@ -376,6 +385,21 @@ expr_t::ptr_op_t post_t::lookup(const symbol_t::kind_t kind,
if (name == "xact")
return WRAP_FUNCTOR(get_wrapper<&get_xact>);
break;
+
+ case 'N':
+ if (name[1] == '\0')
+ return WRAP_FUNCTOR(get_wrapper<&get_count>);
+ break;
+
+ case 'O':
+ if (name[1] == '\0')
+ return WRAP_FUNCTOR(get_wrapper<&get_total>);
+ break;
+
+ case 'R':
+ if (name[1] == '\0')
+ return WRAP_FUNCTOR(get_wrapper<&get_real>);
+ break;
}
return item_t::lookup(kind, name);