From: James Turner Date: Thu, 12 Jun 2014 07:50:09 +0000 (+0100) Subject: Pkg: qualified ID accessor. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=083b364afd8bc078276793128ed0ddba5eda8b53;p=simgear.git Pkg: qualified ID accessor. --- diff --git a/simgear/package/Package.cxx b/simgear/package/Package.cxx index cb654984..8e697c73 100644 --- a/simgear/package/Package.cxx +++ b/simgear/package/Package.cxx @@ -135,6 +135,11 @@ std::string Package::id() const return m_props->getStringValue("id"); } +std::string Package::qualifiedId() const +{ + return m_catalog->id() + "." + id(); +} + std::string Package::md5() const { return m_props->getStringValue("md5"); diff --git a/simgear/package/Package.hxx b/simgear/package/Package.hxx index 43934ddf..034d7dd0 100644 --- a/simgear/package/Package.hxx +++ b/simgear/package/Package.hxx @@ -59,6 +59,11 @@ public: bool isInstalled() const; std::string id() const; + + /** + * Fully-qualified ID, including our catalog'd ID + */ + std::string qualifiedId() const; /** * human-readable name - note this is probably not localised,