00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PALUDIS_GUARD_PALUDIS_FILTER_HANDLER_HH
00022 #define PALUDIS_GUARD_PALUDIS_FILTER_HANDLER_HH 1
00023
00024 #include <paludis/selection_handler-fwd.hh>
00025 #include <paludis/filtered_generator.hh>
00026 #include <paludis/environment-fwd.hh>
00027 #include <paludis/package_id-fwd.hh>
00028 #include <paludis/util/attributes.hh>
00029 #include <paludis/util/instantiation_policy.hh>
00030 #include <tr1/memory>
00031
00032 namespace paludis
00033 {
00034 class SelectionHandler :
00035 private InstantiationPolicy<SelectionHandler, instantiation_method::NonCopyableTag>
00036 {
00037 protected:
00038 const FilteredGenerator _fg;
00039
00040 SelectionHandler(const FilteredGenerator & g) :
00041 _fg(g)
00042 {
00043 }
00044
00045 public:
00046 virtual ~SelectionHandler() = 0;
00047
00048 virtual std::string as_string() const = 0;
00049
00050 virtual std::tr1::shared_ptr<PackageIDSequence> perform_select(const Environment * const) const
00051 PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
00052 };
00053
00054 #ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
00055 extern template class InstantiationPolicy<SelectionHandler, instantiation_method::NonCopyableTag>;
00056 #endif
00057 }
00058
00059 #endif