diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-12 14:55:18 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-12 14:55:18 -0400 |
commit | 28c65cda512135bde36542351533941b019b6ee8 (patch) | |
tree | a321ec72cc0aff1a90dabe8ab07500afb1599fac /src/item.h | |
parent | a1fc3c5cfe2ff1fa01c488d4e130b6592be1f111 (diff) | |
download | fork-ledger-28c65cda512135bde36542351533941b019b6ee8.tar.gz fork-ledger-28c65cda512135bde36542351533941b019b6ee8.tar.bz2 fork-ledger-28c65cda512135bde36542351533941b019b6ee8.zip |
Store metadata values as value_t instead of string
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -106,8 +106,8 @@ public: enum state_t { UNCLEARED = 0, CLEARED, PENDING }; - typedef std::pair<optional<string>, bool> tag_data_t; - typedef std::map<string, tag_data_t> string_map; + typedef std::pair<optional<value_t>, bool> tag_data_t; + typedef std::map<string, tag_data_t> string_map; state_t _state; optional<date_t> _date; @@ -153,14 +153,14 @@ public: virtual bool has_tag(const mask_t& tag_mask, const optional<mask_t>& value_mask = none) const; - virtual optional<string> get_tag(const string& tag) const; - virtual optional<string> get_tag(const mask_t& tag_mask, - const optional<mask_t>& value_mask = none) const; + virtual optional<value_t> get_tag(const string& tag) const; + virtual optional<value_t> get_tag(const mask_t& tag_mask, + const optional<mask_t>& value_mask = none) const; virtual string_map::iterator - set_tag(const string& tag, - const optional<string>& value = none, - const bool overwrite_existing = true); + set_tag(const string& tag, + 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); |