summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/account.cc b/src/account.cc
index f613d983..f1ac713e 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -143,6 +143,10 @@ namespace {
return account.xdata_->value;
}
+ value_t get_depth(account_t& account) {
+ return long(account.depth);
+ }
+
value_t get_depth_spacer(account_t& account) {
std::ostringstream out;
for (account_t * acct = &account;
@@ -168,6 +172,11 @@ expr_t::ptr_op_t account_t::lookup(const string& name)
return WRAP_FUNCTOR(get_wrapper<&get_amount>);
break;
+ case 'd':
+ if (name == "depth")
+ return WRAP_FUNCTOR(get_wrapper<&get_depth>);
+ break;
+
case 'f':
if (name.find("fmt_") == 0) {
switch (name[4]) {