Added the "depth" value expression function for accounts.
This commit is contained in:
parent
b488d1d62f
commit
ad02a482b6
1 changed files with 9 additions and 0 deletions
|
|
@ -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]) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue