aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-06 20:49:39 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-06 20:49:39 +0000
commit46d3fdf6b7e7c50af41ad020628b62122a40ebbd (patch)
tree981c090ba9bc935a47882dbbf0afc94d188b1854
parent0c38d912fcca684f6c44b5a0d0610fa4374efe74 (diff)
downloadpaludis-46d3fdf6b7e7c50af41ad020628b62122a40ebbd.tar.gz
paludis-46d3fdf6b7e7c50af41ad020628b62122a40ebbd.tar.xz
More new query objects
-rw-r--r--paludis/query.cc7
-rw-r--r--paludis/query.hh20
2 files changed, 27 insertions, 0 deletions
diff --git a/paludis/query.cc b/paludis/query.cc
index 217eff3..aeb76c3 100644
--- a/paludis/query.cc
+++ b/paludis/query.cc
@@ -206,6 +206,13 @@ query::Repository::Repository(const RepositoryName & a) :
{
}
+query::Category::Category(const CategoryNamePart & a) :
+ Query(std::tr1::shared_ptr<QueryDelegate>(new MatchesDelegate(PackageDepSpec(
+ std::tr1::shared_ptr<QualifiedPackageName>(),
+ std::tr1::shared_ptr<CategoryNamePart>(new CategoryNamePart(a))))))
+{
+}
+
namespace
{
struct NotMaskedDelegate :
diff --git a/paludis/query.hh b/paludis/query.hh
index aee3837..a8325ce 100644
--- a/paludis/query.hh
+++ b/paludis/query.hh
@@ -228,6 +228,26 @@ namespace paludis
};
/**
+ * Fetch packages in a given category.
+ *
+ * \see Query
+ * \see PackageData
+ * \ingroup grpquerybase::query
+ * \nosubgrouping
+ */
+ class Category :
+ public Query
+ {
+ public:
+ ///\name Basic operations
+ ///\{
+
+ Category(const CategoryNamePart &);
+
+ ///\}
+ };
+
+ /**
* Fetch packages that are not masked.
*
* \see Query