00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PALUDIS_GUARD_PALUDIS_SELECTION_HH
00021 #define PALUDIS_GUARD_PALUDIS_SELECTION_HH 1
00022
00023 #include <paludis/selection-fwd.hh>
00024 #include <paludis/selection_handler-fwd.hh>
00025 #include <paludis/filtered_generator-fwd.hh>
00026 #include <paludis/filter-fwd.hh>
00027 #include <paludis/generator-fwd.hh>
00028 #include <paludis/dep_spec-fwd.hh>
00029 #include <paludis/util/fs_entry-fwd.hh>
00030 #include <paludis/util/private_implementation_pattern.hh>
00031 #include <paludis/util/exception.hh>
00032 #include <paludis/name-fwd.hh>
00033 #include <paludis/package_id-fwd.hh>
00034 #include <paludis/environment-fwd.hh>
00035
00036 namespace paludis
00037 {
00038 class DidNotGetExactlyOneError :
00039 public Exception
00040 {
00041 public:
00042 DidNotGetExactlyOneError(const std::string &,
00043 const std::tr1::shared_ptr<const PackageIDSet> &) throw ();
00044 };
00045
00046 class PALUDIS_VISIBLE Selection :
00047 private PrivateImplementationPattern<Selection>
00048 {
00049 protected:
00050 Selection(const std::tr1::shared_ptr<const SelectionHandler> &);
00051
00052 public:
00053 Selection(const Selection &);
00054 ~Selection();
00055 Selection & operator= (const Selection &);
00056
00057 std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
00058
00059 std::tr1::shared_ptr<PackageIDSequence> perform_select(const Environment * const) const
00060 PALUDIS_ATTRIBUTE((warn_unused_result));
00061 };
00062
00063 namespace selection
00064 {
00065 class PALUDIS_VISIBLE SomeArbitraryVersion :
00066 public Selection
00067 {
00068 public:
00069 SomeArbitraryVersion(const FilteredGenerator &);
00070 };
00071
00072 class PALUDIS_VISIBLE BestVersionOnly :
00073 public Selection
00074 {
00075 public:
00076 BestVersionOnly(const FilteredGenerator &);
00077 };
00078
00079 class PALUDIS_VISIBLE BestVersionInEachSlot :
00080 public Selection
00081 {
00082 public:
00083 BestVersionInEachSlot(const FilteredGenerator &);
00084 };
00085
00086 class PALUDIS_VISIBLE AllVersionsSorted :
00087 public Selection
00088 {
00089 public:
00090 AllVersionsSorted(const FilteredGenerator &);
00091 };
00092
00093 class PALUDIS_VISIBLE AllVersionsGroupedBySlot :
00094 public Selection
00095 {
00096 public:
00097 AllVersionsGroupedBySlot(const FilteredGenerator &);
00098 };
00099
00100 class PALUDIS_VISIBLE AllVersionsUnsorted :
00101 public Selection
00102 {
00103 public:
00104 AllVersionsUnsorted(const FilteredGenerator &);
00105 };
00106
00107 class PALUDIS_VISIBLE RequireExactlyOne :
00108 public Selection
00109 {
00110 public:
00111 RequireExactlyOne(const FilteredGenerator &);
00112 };
00113 }
00114
00115 #ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
00116 extern template class PrivateImplementationPattern<Selection>;
00117 #endif
00118 }
00119
00120 #endif