summaryrefslogtreecommitdiff
path: root/src/item.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-03-07 22:47:07 -0500
committerJohn Wiegley <johnw@newartisans.com>2010-03-08 01:11:48 -0500
commit75b7294a6db10e7f7b18b6aeef1aa0f568124a1d (patch)
tree0fecbc12acaacb33cf3c241c536de3347d2742ed /src/item.h
parent7e79cd82cd4ad5f87f40e6beebdb53e65bb11168 (diff)
downloadfork-ledger-75b7294a6db10e7f7b18b6aeef1aa0f568124a1d.tar.gz
fork-ledger-75b7294a6db10e7f7b18b6aeef1aa0f568124a1d.tar.bz2
fork-ledger-75b7294a6db10e7f7b18b6aeef1aa0f568124a1d.zip
Rewrite the "print" command as a custom function
There ended up being too many corner cases for the generalized formatter to handle.
Diffstat (limited to 'src/item.h')
-rw-r--r--src/item.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/item.h b/src/item.h
index 4cca9de4..f82e8da6 100644
--- a/src/item.h
+++ b/src/item.h
@@ -106,7 +106,8 @@ public:
enum state_t { UNCLEARED = 0, CLEARED, PENDING };
- typedef std::map<string, optional<string> > string_map;
+ typedef std::pair<optional<string>, bool> tag_data_t;
+ typedef std::map<string, tag_data_t> string_map;
state_t _state;
optional<date_t> _date;
@@ -156,8 +157,8 @@ public:
virtual optional<string> get_tag(const mask_t& tag_mask,
const optional<mask_t>& value_mask = none) const;
- virtual void set_tag(const string& tag,
- const optional<string>& value = none);
+ virtual string_map::iterator set_tag(const string& tag,
+ const optional<string>& value = none);
virtual void parse_tags(const char * p,
optional<date_t::year_type> current_year = none);