generator.hh

00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 2008 Ciaran McCreesh
00005  *
00006  * This file is part of the Paludis package manager. Paludis is free software;
00007  * you can redistribute it and/or modify it under the terms of the GNU General
00008  * Public License version 2, as published by the Free Software Foundation.
00009  *
00010  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
00011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00012  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00013  * details.
00014  *
00015  * You should have received a copy of the GNU General Public License along with
00016  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00017  * Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 #ifndef PALUDIS_GUARD_PALUDIS_GENERATOR_HH
00021 #define PALUDIS_GUARD_PALUDIS_GENERATOR_HH 1
00022 
00023 #include <paludis/generator-fwd.hh>
00024 #include <paludis/generator_handler-fwd.hh>
00025 #include <paludis/util/private_implementation_pattern.hh>
00026 #include <paludis/util/options.hh>
00027 #include <paludis/filtered_generator-fwd.hh>
00028 #include <paludis/name-fwd.hh>
00029 #include <paludis/environment-fwd.hh>
00030 #include <paludis/package_id-fwd.hh>
00031 #include <paludis/dep_spec-fwd.hh>
00032 #include <paludis/match_package-fwd.hh>
00033 #include <tr1/memory>
00034 
00035 namespace paludis
00036 {
00037     class PALUDIS_VISIBLE Generator :
00038         private PrivateImplementationPattern<Generator>
00039     {
00040         protected:
00041             Generator(const std::tr1::shared_ptr<const GeneratorHandler> &);
00042 
00043         public:
00044             Generator(const Generator &);
00045             Generator & operator= (const Generator &);
00046             ~Generator();
00047 
00048             operator FilteredGenerator () const PALUDIS_ATTRIBUTE((warn_unused_result));
00049 
00050             std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
00051 
00052             std::tr1::shared_ptr<const RepositoryNameSet> repositories(
00053                     const Environment * const) const
00054                 PALUDIS_ATTRIBUTE((warn_unused_result));
00055 
00056             std::tr1::shared_ptr<const CategoryNamePartSet> categories(
00057                     const Environment * const,
00058                     const std::tr1::shared_ptr<const RepositoryNameSet> &) const
00059                 PALUDIS_ATTRIBUTE((warn_unused_result));
00060 
00061             std::tr1::shared_ptr<const QualifiedPackageNameSet> packages(
00062                     const Environment * const,
00063                     const std::tr1::shared_ptr<const RepositoryNameSet> &,
00064                     const std::tr1::shared_ptr<const CategoryNamePartSet> &) const
00065                 PALUDIS_ATTRIBUTE((warn_unused_result));
00066 
00067             std::tr1::shared_ptr<const PackageIDSet> ids(
00068                     const Environment * const,
00069                     const std::tr1::shared_ptr<const RepositoryNameSet> &,
00070                     const std::tr1::shared_ptr<const QualifiedPackageNameSet> &) const
00071                 PALUDIS_ATTRIBUTE((warn_unused_result));
00072     };
00073 
00074     namespace generator
00075     {
00076         class PALUDIS_VISIBLE All :
00077             public Generator
00078         {
00079             public:
00080                 All();
00081         };
00082 
00083         class PALUDIS_VISIBLE Matches :
00084             public Generator
00085         {
00086             public:
00087                 Matches(const PackageDepSpec &, const MatchPackageOptions &);
00088         };
00089 
00090         class PALUDIS_VISIBLE Package :
00091             public Generator
00092         {
00093             public:
00094                 Package(const QualifiedPackageName &);
00095         };
00096 
00097         class PALUDIS_VISIBLE FromRepository :
00098             public Generator
00099         {
00100             public:
00101                 FromRepository(const RepositoryName &);
00102         };
00103 
00104         class PALUDIS_VISIBLE InRepository :
00105             public Generator
00106         {
00107             public:
00108                 InRepository(const RepositoryName &);
00109         };
00110 
00111         class PALUDIS_VISIBLE Category :
00112             public Generator
00113         {
00114             public:
00115                 Category(const CategoryNamePart &);
00116         };
00117 
00118         class PALUDIS_VISIBLE Intersection :
00119             public Generator
00120         {
00121             public:
00122                 Intersection(const Generator &, const Generator &);
00123         };
00124 
00125         template <typename>
00126         class PALUDIS_VISIBLE SomeIDsMightSupportAction :
00127             public Generator
00128         {
00129             public:
00130                 SomeIDsMightSupportAction();
00131         };
00132     }
00133 
00134 #ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
00135     extern template class PrivateImplementationPattern<Generator>;
00136 #endif
00137 
00138 }
00139 
00140 #endif

Generated on Mon Sep 21 10:36:08 2009 for paludis by  doxygen 1.5.4