aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-05 22:42:11 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-05 22:42:11 +0000
commit7a58de7637da67d8420cab0b69c79bbb376a5688 (patch)
treec05a5951939608c4d647af0f60c580f04d815cde
parentfcbbe6ab11f7ebae5fdbf5aca8ec6d8fef8614c2 (diff)
downloadpaludis-7a58de7637da67d8420cab0b69c79bbb376a5688.tar.gz
paludis-7a58de7637da67d8420cab0b69c79bbb376a5688.tar.xz
Doxygenate selections etc
-rw-r--r--doc/api/cplusplus/groups.doxygen8
-rw-r--r--paludis/filter-fwd.hh13
-rw-r--r--paludis/filter.hh95
-rw-r--r--paludis/filtered_generator-fwd.hh20
-rw-r--r--paludis/filtered_generator.hh32
-rw-r--r--paludis/generator-fwd.hh26
-rw-r--r--paludis/generator.hh121
-rw-r--r--paludis/selection-fwd.hh13
-rw-r--r--paludis/selection.hh124
9 files changed, 444 insertions, 8 deletions
diff --git a/doc/api/cplusplus/groups.doxygen b/doc/api/cplusplus/groups.doxygen
index 1780325..8cc58c6 100644
--- a/doc/api/cplusplus/groups.doxygen
+++ b/doc/api/cplusplus/groups.doxygen
@@ -95,6 +95,14 @@ using namespace paludis;
* - \ref example_selection.cc "example_selection.cc"
*/
+/** \defgroup g_selections Queries
+ *
+ * \ingroup g_environment
+ *
+ * Calling Environment::operator[] with a Selection parameter is the usual way
+ * of querying for PackageID instances with given properties.
+ */
+
/** \defgroup g_exceptions Exceptions
*
* Exceptions and related utility classes.
diff --git a/paludis/filter-fwd.hh b/paludis/filter-fwd.hh
index c10c7a9..69c92e8 100644
--- a/paludis/filter-fwd.hh
+++ b/paludis/filter-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +23,12 @@
#include <paludis/util/attributes.hh>
#include <iosfwd>
+/** \file
+ * Forward declarations for paludis/filter.hh .
+ *
+ * \ingroup g_selections
+ */
+
namespace paludis
{
class Filter;
@@ -37,6 +43,11 @@ namespace paludis
class Slot;
}
+ /**
+ * A Filter can be represented as a string, can be written to a stream.
+ *
+ * \ingroup g_selections
+ */
std::ostream & operator<< (std::ostream &, const Filter &)
PALUDIS_VISIBLE;
}
diff --git a/paludis/filter.hh b/paludis/filter.hh
index 7e3b375..fe025af 100644
--- a/paludis/filter.hh
+++ b/paludis/filter.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -32,8 +32,25 @@
#include <paludis/action-fwd.hh>
#include <tr1/memory>
+/** \file
+ * Declarations for the Filter class.
+ *
+ * \ingroup g_selections
+ *
+ * \section Examples
+ *
+ * - \ref example_selection.cc "example_selection.cc"
+ */
+
namespace paludis
{
+ /**
+ * A Filter subclass can be used to further restrict the values picked by a
+ * Generator, which when combined together produces a FilteredGenerator
+ * which can be passed to a Selection subclass.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Filter :
private PrivateImplementationPattern<Filter>
{
@@ -41,37 +58,70 @@ namespace paludis
Filter(const std::tr1::shared_ptr<const FilterHandler> &);
public:
+ ///\name Basic operations
+ ///\{
+
+ /**
+ * Filter subclasses can be copied without losing information.
+ */
Filter(const Filter &);
Filter & operator= (const Filter &);
~Filter();
+ ///\}
+
+ /**
+ * A Filter can be represented as a string, for use by operator<<.
+ */
std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ///\name For use by Selection
+ ///\{
+
+ /**
+ * Filter candidate repository names.
+ */
std::tr1::shared_ptr<const RepositoryNameSet> repositories(
const Environment * const,
const std::tr1::shared_ptr<const RepositoryNameSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Filter candidate category names.
+ */
std::tr1::shared_ptr<const CategoryNamePartSet> categories(
const Environment * const,
const std::tr1::shared_ptr<const RepositoryNameSet> &,
const std::tr1::shared_ptr<const CategoryNamePartSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Filter candidate package names.
+ */
std::tr1::shared_ptr<const QualifiedPackageNameSet> packages(
const Environment * const,
const std::tr1::shared_ptr<const RepositoryNameSet> &,
const std::tr1::shared_ptr<const QualifiedPackageNameSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Filter candidate PackageID instances.
+ */
std::tr1::shared_ptr<const PackageIDSet> ids(
const Environment * const,
const std::tr1::shared_ptr<const PackageIDSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ ///\}
};
namespace filter
{
+ /**
+ * A Filter which accepts all PackageID instances.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE All :
public Filter
{
@@ -79,6 +129,12 @@ namespace paludis
All();
};
+ /**
+ * A Filter which accepts only PackageID instances which support a given
+ * Action subclass.
+ *
+ * \ingroup g_selections
+ */
template <typename>
class PALUDIS_VISIBLE SupportsAction :
public Filter
@@ -87,6 +143,11 @@ namespace paludis
SupportsAction();
};
+ /**
+ * A Filter which accepts only PackageID instances which are not masked.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE NotMasked :
public Filter
{
@@ -94,6 +155,12 @@ namespace paludis
NotMasked();
};
+ /**
+ * A Filter which accepts only PackageID instances that are installed to
+ * a particular root.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE InstalledAtRoot :
public Filter
{
@@ -101,6 +168,14 @@ namespace paludis
InstalledAtRoot(const FSEntry &);
};
+ /**
+ * A Filter which accepts only PackageID instances that are accepted by
+ * two different filters.
+ *
+ * Used internally by FilteredGenerator.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE And :
public Filter
{
@@ -108,6 +183,13 @@ namespace paludis
And(const Filter &, const Filter &);
};
+ /**
+ * A Filter which accepts only PackageID instances that have the same
+ * slot as the specified PackageID, or, if the specified PackageID has
+ * no slot, that have no slot.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE SameSlot :
public Filter
{
@@ -115,6 +197,12 @@ namespace paludis
SameSlot(const std::tr1::shared_ptr<const PackageID> &);
};
+ /**
+ * A Filter which accepts only PackageID instances that have a
+ * particular slot.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Slot :
public Filter
{
@@ -122,6 +210,11 @@ namespace paludis
Slot(const SlotName &);
};
+ /**
+ * A Filter which accepts only PackageID instances that have no slot.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE NoSlot :
public Filter
{
diff --git a/paludis/filtered_generator-fwd.hh b/paludis/filtered_generator-fwd.hh
index 93e3f7b..ca3b14d 100644
--- a/paludis/filtered_generator-fwd.hh
+++ b/paludis/filtered_generator-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -24,13 +24,31 @@
#include <paludis/util/attributes.hh>
#include <iosfwd>
+/** \file
+ * Forward declarations for paludis/filtered_generator.hh .
+ *
+ * \ingroup g_selections
+ */
+
namespace paludis
{
class FilteredGenerator;
+ /**
+ * A FilteredGenerator can be combined with another Filter to further
+ * restrict desired properties.
+ *
+ * \ingroup g_selections
+ */
FilteredGenerator operator| (const FilteredGenerator &, const Filter &)
PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+ /**
+ * A FilteredGenerator can be represented as a string. Generally this is
+ * used only for stringifying a Selection.
+ *
+ * \ingroup g_selections
+ */
std::ostream & operator<< (std::ostream &, const FilteredGenerator &)
PALUDIS_VISIBLE;
}
diff --git a/paludis/filtered_generator.hh b/paludis/filtered_generator.hh
index 961207d..0558163 100644
--- a/paludis/filtered_generator.hh
+++ b/paludis/filtered_generator.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -25,19 +25,49 @@
#include <paludis/filter-fwd.hh>
#include <paludis/generator-fwd.hh>
+/** \file
+ * Declarations for the FilteredGenerator class.
+ *
+ * \ingroup g_selections
+ *
+ * \section Examples
+ *
+ * - \ref example_selection.cc "example_selection.cc"
+ */
+
namespace paludis
{
+ /**
+ * A FilteredGenerator specifies a desired set of properties for PackageIDs
+ * to be returned by Environment::operator[].
+ *
+ * Most Selection subclasses take a single FilteredGenerator as a parameter.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE FilteredGenerator :
private PrivateImplementationPattern<FilteredGenerator>
{
public:
+ ///\name Basic operations
+ ///\{
+
FilteredGenerator(const FilteredGenerator &);
FilteredGenerator(const Generator &, const Filter &);
FilteredGenerator(const FilteredGenerator &, const Filter &);
FilteredGenerator & operator= (const FilteredGenerator &);
~FilteredGenerator();
+ ///\}
+
+ /**
+ * Return our Generator.
+ */
const Generator & generator() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /**
+ * Return our Filter.
+ */
const Filter & filter() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/paludis/generator-fwd.hh b/paludis/generator-fwd.hh
index 48bc9cb..4629ac8 100644
--- a/paludis/generator-fwd.hh
+++ b/paludis/generator-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +23,12 @@
#include <paludis/util/attributes.hh>
#include <iosfwd>
+/** \file
+ * Forward declarations for paludis/generator.hh .
+ *
+ * \ingroup g_selections
+ */
+
namespace paludis
{
class Generator;
@@ -40,12 +46,30 @@ namespace paludis
template <typename> class SomeIDsMightSupportAction;
}
+ /**
+ * Two Generator instances can be and-ed together, to obtain only PackageID
+ * instances that satisfy the constraints of Generator instances.
+ *
+ * \ingroup g_selections
+ */
Generator operator& (const Generator &, const Generator &)
PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+ /**
+ * Two Generator instances can be added, to obtain PackageID instances that
+ * satisfy the constraints of either Generator instance.
+ *
+ * \ingroup g_selections
+ */
Generator operator+ (const Generator &, const Generator &)
PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+ /**
+ * A FilteredGenerator can be represented as a string. Generally this is
+ * used only for stringifying a Selection.
+ *
+ * \ingroup g_selections
+ */
std::ostream & operator<< (std::ostream &, const Generator &)
PALUDIS_VISIBLE;
}
diff --git a/paludis/generator.hh b/paludis/generator.hh
index f826d20..fe793f0 100644
--- a/paludis/generator.hh
+++ b/paludis/generator.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -32,8 +32,28 @@
#include <paludis/match_package-fwd.hh>
#include <tr1/memory>
+/** \file
+ * Declarations for the Generator class.
+ *
+ * \ingroup g_selections
+ *
+ * \section Examples
+ *
+ * - \ref example_selection.cc "example_selection.cc"
+ */
+
namespace paludis
{
+ /**
+ * A Generator specifies general properties desired from the PackageID
+ * instances to be returned by Environment::operator[].
+ *
+ * A Generator can be converted implicitly to a FilteredGenerator, either
+ * for being passed directly to a Selection subclass or for combining with
+ * one or more Filter subclasses.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Generator :
private PrivateImplementationPattern<Generator>
{
@@ -41,38 +61,80 @@ namespace paludis
Generator(const std::tr1::shared_ptr<const GeneratorHandler> &);
public:
+ ///\name Basic operations
+ ///\{
+
+ /**
+ * Generator subclasses can be copied without losing information.
+ */
Generator(const Generator &);
Generator & operator= (const Generator &);
~Generator();
+ ///\}
+
+ /**
+ * We can implicitly convert to a FilteredGenerator, for being
+ * passed to a Selection subclass or combined with one or more
+ * Filter subclasses.
+ */
operator FilteredGenerator () const PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * We are representable as a string, for use when stringifying.
+ */
std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ///\name For use by Selection
+ ///\{
+
+ /**
+ * Used by Selection subclasses to get a candidate set of
+ * repositories for consideration.
+ */
std::tr1::shared_ptr<const RepositoryNameSet> repositories(
const Environment * const) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Used by Selection subclasses to get a candidate set of categories
+ * for consideration.
+ */
std::tr1::shared_ptr<const CategoryNamePartSet> categories(
const Environment * const,
const std::tr1::shared_ptr<const RepositoryNameSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Used by Selection subclasses to get a candidate set of package
+ * names for consideration.
+ */
std::tr1::shared_ptr<const QualifiedPackageNameSet> packages(
const Environment * const,
const std::tr1::shared_ptr<const RepositoryNameSet> &,
const std::tr1::shared_ptr<const CategoryNamePartSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Used by Selection subclasses to get a candidate set of PackageID
+ * instances for consideration.
+ */
std::tr1::shared_ptr<const PackageIDSet> ids(
const Environment * const,
const std::tr1::shared_ptr<const RepositoryNameSet> &,
const std::tr1::shared_ptr<const QualifiedPackageNameSet> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ ///\}
};
namespace generator
{
+ /**
+ * A Generator which returns all PackageIDs.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE All :
public Generator
{
@@ -80,6 +142,12 @@ namespace paludis
All();
};
+ /**
+ * A Generator which returns only those PackageIDs which match a
+ * particular PackageDepSpec.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Matches :
public Generator
{
@@ -87,6 +155,12 @@ namespace paludis
Matches(const PackageDepSpec &, const MatchPackageOptions &);
};
+ /**
+ * A Generator which returns only those PackageIDs which have a
+ * particular package name.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Package :
public Generator
{
@@ -94,6 +168,12 @@ namespace paludis
Package(const QualifiedPackageName &);
};
+ /**
+ * A Generator which returns only those PackageIDs which are from a
+ * particular repository.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE FromRepository :
public Generator
{
@@ -101,6 +181,12 @@ namespace paludis
FromRepository(const RepositoryName &);
};
+ /**
+ * A Generator which returns only those PackageIDs which are in a
+ * particular repository.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE InRepository :
public Generator
{
@@ -108,6 +194,12 @@ namespace paludis
InRepository(const RepositoryName &);
};
+ /**
+ * A Generator which returns only those PackageIDs which are in a
+ * particular category.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Category :
public Generator
{
@@ -115,6 +207,14 @@ namespace paludis
Category(const CategoryNamePart &);
};
+ /**
+ * A Generator which returns the intersection of two other Generator
+ * instances.
+ *
+ * Usually constructed by using operator + on two Generators.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Intersection :
public Generator
{
@@ -122,6 +222,14 @@ namespace paludis
Intersection(const Generator &, const Generator &);
};
+ /**
+ * A Generator which returns the union of two other Generator
+ * instances.
+ *
+ * Usually constructed by using operator & on two Generators.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Union :
public Generator
{
@@ -129,6 +237,17 @@ namespace paludis
Union(const Generator &, const Generator &);
};
+ /**
+ * A Generator which returns PackageID instances which might support a
+ * particular Action.
+ *
+ * There is no guarantee that returned PackageID instances will actually
+ * support the Action subclass in question. However, explicitly checking
+ * whether a PackageID really does support an Action is sometimes more
+ * work than is necessary at the query stage.
+ *
+ * \ingroup g_selections
+ */
template <typename>
class PALUDIS_VISIBLE SomeIDsMightSupportAction :
public Generator
diff --git a/paludis/selection-fwd.hh b/paludis/selection-fwd.hh
index cf4a5d7..4a9f482 100644
--- a/paludis/selection-fwd.hh
+++ b/paludis/selection-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +23,12 @@
#include <iosfwd>
#include <paludis/util/attributes.hh>
+/** \file
+ * Forward declarations for paludis/selection.hh .
+ *
+ * \ingroup g_selections
+ */
+
namespace paludis
{
class Selection;
@@ -40,6 +46,11 @@ namespace paludis
class DidNotGetExactlyOneError;
+ /**
+ * A Selection can be represented as a string, can be written to a stream.
+ *
+ * \ingroup g_selections
+ */
std::ostream & operator<< (std::ostream &, const Selection &) PALUDIS_VISIBLE;
}
diff --git a/paludis/selection.hh b/paludis/selection.hh
index 3abc376..fd13699 100644
--- a/paludis/selection.hh
+++ b/paludis/selection.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -33,8 +33,23 @@
#include <paludis/package_id-fwd.hh>
#include <paludis/environment-fwd.hh>
+/** \file
+ * Declarations for the Selection class.
+ *
+ * \ingroup g_selections
+ *
+ * \section Examples
+ *
+ * - \ref example_selection.cc "example_selection.cc"
+ */
+
namespace paludis
{
+ /**
+ * Thrown if selection::RequireExactlyOne does not get exactly one result.
+ *
+ * \ingroup g_selections
+ */
class DidNotGetExactlyOneError :
public Exception
{
@@ -43,6 +58,16 @@ namespace paludis
const std::tr1::shared_ptr<const PackageIDSet> &) throw ();
};
+ /**
+ * A Selection subclass is passed to Environment::operator[] to obtain a set
+ * of PackageID instances with given properties.
+ *
+ * Most Selection subclasses take a FilteredGenerator as a constructor
+ * parameter that specifies the required properties; the Selection itself is
+ * merely responsible for determining the format of the results.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE Selection :
private PrivateImplementationPattern<Selection>
{
@@ -50,65 +75,162 @@ namespace paludis
Selection(const std::tr1::shared_ptr<const SelectionHandler> &);
public:
+ ///\name Basic operations
+ ///\{
+
+ /**
+ * Selection subclasses can be copied to a Selection without
+ * destroying information.
+ */
Selection(const Selection &);
+
~Selection();
Selection & operator= (const Selection &);
+ ///\}
+
+ /**
+ * Return a string representation of our selection query.
+ */
std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * For use by Environment, not to be called directly.
+ */
std::tr1::shared_ptr<PackageIDSequence> perform_select(const Environment * const) const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
namespace selection
{
+ /**
+ * Select some arbitrary version with the specified properties.
+ *
+ * Mostly used if you want to find out whether a PackageID with a
+ * particular property exists, but do not want to do anything in
+ * particular with the results.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE SomeArbitraryVersion :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
SomeArbitraryVersion(const FilteredGenerator &);
+
+ ///\}
};
+ /**
+ * Return only the best version of each matching package with the
+ * specified properties.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE BestVersionOnly :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
BestVersionOnly(const FilteredGenerator &);
+
+ ///\}
};
+ /**
+ * Return the best version in each slot of each matching package with
+ * the specified properties.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE BestVersionInEachSlot :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
BestVersionInEachSlot(const FilteredGenerator &);
+
+ ///\}
};
+ /**
+ * Return all versions with the specified properties, sorted from worst
+ * to best.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE AllVersionsSorted :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
AllVersionsSorted(const FilteredGenerator &);
+
+ ///\}
};
+ /**
+ * Return all versions with the specified properties, sorted from worst
+ * to best, but with like slots grouped together.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE AllVersionsGroupedBySlot :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
AllVersionsGroupedBySlot(const FilteredGenerator &);
+
+ ///\}
};
+ /**
+ * Return all versions with the specified properties, in no particular
+ * order.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE AllVersionsUnsorted :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
AllVersionsUnsorted(const FilteredGenerator &);
+
+ ///\}
};
+ /**
+ * Return the single version with the specified properties.
+ *
+ * If there is not exactly one version, throws DidNotGetExactlyOneError.
+ *
+ * \ingroup g_selections
+ */
class PALUDIS_VISIBLE RequireExactlyOne :
public Selection
{
public:
+ ///\name Basic operations
+ ///\{
+
RequireExactlyOne(const FilteredGenerator &);
+
+ ///\}
};
}