diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-29 14:43:16 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-29 14:43:16 -0600 |
commit | 520ece21644c4f3a97f722e351fce382c1661183 (patch) | |
tree | 1247ef37d801e3fe29254924640008c4dbf4d587 /src/item.h | |
parent | 5517871144e61ec1c7bad8f4dd96e0672e63f9d1 (diff) | |
download | fork-ledger-520ece21644c4f3a97f722e351fce382c1661183.tar.gz fork-ledger-520ece21644c4f3a97f722e351fce382c1661183.tar.bz2 fork-ledger-520ece21644c4f3a97f722e351fce382c1661183.zip |
Fixed problem with the Python build
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -151,6 +151,19 @@ public: return ! (*this == xact); } + string id() const { + if (optional<value_t> ref = get_tag(_("UUID"))) { + return ref->to_string(); + } else { + std::ostringstream buf; + buf << seq(); + return buf.str(); + } + } + std::size_t seq() const { + return pos ? pos->sequence : 0L; + } + virtual bool has_tag(const string& tag, bool inherit = true) const; virtual bool has_tag(const mask_t& tag_mask, |