summaryrefslogtreecommitdiff
path: root/src/item.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-12 15:42:02 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-12 15:43:00 -0400
commitb1b4e2aadff5983d443d70c09ea86a41b015873f (patch)
tree2c40305c9f9841a4c3d453a4a5c49ec69056b4b2 /src/item.h
parent0555e7f61ef14ec667f8ba611e60fd96133a9676 (diff)
downloadfork-ledger-b1b4e2aadff5983d443d70c09ea86a41b015873f.tar.gz
fork-ledger-b1b4e2aadff5983d443d70c09ea86a41b015873f.tar.bz2
fork-ledger-b1b4e2aadff5983d443d70c09ea86a41b015873f.zip
Add support for typed metadata
The metadata construct 'Key: Value' is now just a special case for 'Key:: "Value"'. Another after a :: in metadata setting is parsed as a full value expression and typed as such. For example: ; Key:: $400 + $500 ledger -l 'tag("Key") < $1000'
Diffstat (limited to 'src/item.h')
-rw-r--r--src/item.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/item.h b/src/item.h
index 61438593..209b2dc2 100644
--- a/src/item.h
+++ b/src/item.h
@@ -162,10 +162,14 @@ public:
const optional<value_t>& value = none,
const bool overwrite_existing = true);
- virtual void parse_tags(const char * p, bool overwrite_existing = true,
- optional<date_t::year_type> current_year = none);
- virtual void append_note(const char * p, bool overwrite_existing = true,
- optional<date_t::year_type> current_year = none);
+ virtual void parse_tags(const char * p,
+ scope_t& scope,
+ bool overwrite_existing = true,
+ optional<date_t::year_type> current_year = none);
+ virtual void append_note(const char * p,
+ scope_t& scope,
+ bool overwrite_existing = true,
+ optional<date_t::year_type> current_year = none);
static bool use_effective_date;