From 03cafe4547d9a9c617ce0a7840946e4c7a72272f Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Wed, 4 Jun 2014 17:47:29 +0200 Subject: [PATCH] Catalog: add method to get all packages in a catalog. --- simgear/package/Catalog.cxx | 6 ++++++ simgear/package/Catalog.hxx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/simgear/package/Catalog.cxx b/simgear/package/Catalog.cxx index 982b2532..6bc23efe 100644 --- a/simgear/package/Catalog.cxx +++ b/simgear/package/Catalog.cxx @@ -170,6 +170,12 @@ CatalogRef Catalog::createFromPath(Root* aRoot, const SGPath& aPath) return c; } +PackageList const& +Catalog::packages() const +{ + return m_packages; +} + PackageList Catalog::packagesMatching(const SGPropertyNode* aFilter) const { diff --git a/simgear/package/Catalog.hxx b/simgear/package/Catalog.hxx index 3f98fffb..e3861819 100644 --- a/simgear/package/Catalog.hxx +++ b/simgear/package/Catalog.hxx @@ -67,6 +67,12 @@ public: * perform a refresh of the catalog contents */ void refresh(); + + /** + * Get all packages in this catalog. + */ + PackageList const& packages() const; + /** * retrieve packages in this catalog matching a filter. * filter consists of required / minimum values, AND-ed together.