From 520ece21644c4f3a97f722e351fce382c1661183 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 29 Feb 2012 14:43:16 -0600 Subject: Fixed problem with the Python build --- src/item.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/item.h') diff --git a/src/item.h b/src/item.h index 62575d8b..af3992c0 100644 --- a/src/item.h +++ b/src/item.h @@ -151,6 +151,19 @@ public: return ! (*this == xact); } + string id() const { + if (optional 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, -- cgit v1.2.3