diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-14 20:43:28 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-14 20:43:28 -0500 |
commit | badbeb545b9e700e6656dfbc348bfe1387cb2ffa (patch) | |
tree | 26237a150367e13a24917d994602f5f94f979ec8 /src/account.cc | |
parent | 73baf9cd727407f6e47b410bbde3b4bcad482ae3 (diff) | |
parent | 8d698e5ccb471d546eee8a5bea6d6c56ec4b08c3 (diff) | |
download | fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.tar.gz fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.tar.bz2 fork-ledger-badbeb545b9e700e6656dfbc348bfe1387cb2ffa.zip |
Merge branch 'next'
Diffstat (limited to 'src/account.cc')
-rw-r--r-- | src/account.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/account.cc b/src/account.cc index da43745a..e6c7af56 100644 --- a/src/account.cc +++ b/src/account.cc @@ -249,7 +249,7 @@ expr_t::ptr_op_t account_t::lookup(const symbol_t::kind_t kind, switch (name[0]) { case 'a': - if (name == "amount") + if (name[1] == '\0' || name == "amount") return WRAP_FUNCTOR(get_wrapper<&get_amount>); else if (name == "account") return WRAP_FUNCTOR(get_wrapper<&get_account>); @@ -272,11 +272,20 @@ expr_t::ptr_op_t account_t::lookup(const symbol_t::kind_t kind, case 'i': if (name == "is_account") return WRAP_FUNCTOR(get_wrapper<&get_true>); + else if (name == "is_index") + return WRAP_FUNCTOR(get_wrapper<&get_subcount>); break; case 'l': if (name == "latest_cleared") return WRAP_FUNCTOR(get_wrapper<&get_latest_cleared>); + else if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_depth>); + break; + + case 'n': + if (name[1] == '\0') + return WRAP_FUNCTOR(get_wrapper<&get_subcount>); break; case 'p': @@ -300,6 +309,16 @@ expr_t::ptr_op_t account_t::lookup(const symbol_t::kind_t kind, if (name == "use_direct_amount") return WRAP_FUNCTOR(get_wrapper<&ignore>); 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; } return NULL; |