diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-24 02:23:20 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-24 02:23:20 -0400 |
commit | 625b94cf04d083a2eca50e5630d8f7b551781742 (patch) | |
tree | 0c45d5b5cae5daeaa5fa6ab91c4bc1de31d90b6b /src/item.cc | |
parent | cb751913ef85305f2f13cd3a9af80adc00278627 (diff) | |
download | fork-ledger-625b94cf04d083a2eca50e5630d8f7b551781742.tar.gz fork-ledger-625b94cf04d083a2eca50e5630d8f7b551781742.tar.bz2 fork-ledger-625b94cf04d083a2eca50e5630d8f7b551781742.zip |
Switched from using POST_AUTO to ITEM_GENERATED
Diffstat (limited to 'src/item.cc')
-rw-r--r-- | src/item.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/item.cc b/src/item.cc index 27fc6ef3..c6aed1a1 100644 --- a/src/item.cc +++ b/src/item.cc @@ -180,6 +180,10 @@ namespace { return item.state() == item_t::PENDING; } + value_t get_actual(item_t& item) { + return ! item.has_flags(ITEM_GENERATED); + } + value_t get_date(item_t& item) { return item.date(); } @@ -196,8 +200,7 @@ namespace { else if (args[0].is_mask()) return item.has_tag(args[0].as_mask()); } else { - return item.has_tag(args[0].to_mask(), - args[1].to_mask()); + return item.has_tag(args[0].to_mask(), args[1].to_mask()); } return false; } @@ -265,6 +268,11 @@ value_t get_comment(item_t& item) expr_t::ptr_op_t item_t::lookup(const string& name) { switch (name[0]) { + case 'a': + if (name == "actual") + return WRAP_FUNCTOR(get_wrapper<&get_actual>); + break; + case 'b': if (name == "beg_line") return WRAP_FUNCTOR(get_wrapper<&get_beg_line>); |