handled_information.hh

Go to the documentation of this file.
00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 2007, 2008, 2009 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_HANDLED_INFORMATION_HH
00021 #define PALUDIS_GUARD_PALUDIS_HANDLED_INFORMATION_HH 1
00022 
00023 #include <paludis/handled_information-fwd.hh>
00024 #include <paludis/util/simple_visitor.hh>
00025 #include <paludis/util/attributes.hh>
00026 #include <paludis/util/private_implementation_pattern.hh>
00027 #include <paludis/util/type_list.hh>
00028 #include <paludis/dep_spec-fwd.hh>
00029 #include <paludis/package_id-fwd.hh>
00030 
00031 /** \file
00032  * Declarations for DepListEntryHandled classes, which are used by DepList and
00033  * InstallTask to keep track of whether a DepListEntry has been handled yet.
00034  *
00035  * \ingroup g_dep_list
00036  *
00037  * \section Examples
00038  *
00039  * - None at this time.
00040  */
00041 
00042 namespace paludis
00043 {
00044     /**
00045      * Represents a DepListEntry that has been handled.
00046      *
00047      * \ingroup g_dep_list
00048      * \since 0.26
00049      * \nosubgrouping
00050      */
00051     class PALUDIS_VISIBLE DepListEntryHandled :
00052         public virtual DeclareAbstractAcceptMethods<DepListEntryHandled, MakeTypeList<
00053                 DepListEntryHandledSuccess,
00054                 DepListEntryHandledFetchSuccess,
00055                 DepListEntryHandledFetchFailed,
00056                 DepListEntryHandledSkippedUnsatisfied,
00057                 DepListEntryHandledSkippedDependent,
00058                 DepListEntryHandledFailed,
00059                 DepListEntryUnhandled,
00060                 DepListEntryNoHandlingRequired>::Type>
00061     {
00062         public:
00063             virtual ~DepListEntryHandled() = 0;
00064     };
00065 
00066     /**
00067      * Represents a DepListEntry that has not been handled.
00068      *
00069      * \ingroup g_dep_list
00070      * \since 0.26
00071      * \nosubgrouping
00072      */
00073     class PALUDIS_VISIBLE DepListEntryUnhandled :
00074         public DepListEntryHandled,
00075         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryUnhandled>
00076     {
00077     };
00078 
00079     /**
00080      * Represents a DepListEntry that requires no handling.
00081      *
00082      * \ingroup g_dep_list
00083      * \since 0.26
00084      * \nosubgrouping
00085      */
00086     class PALUDIS_VISIBLE DepListEntryNoHandlingRequired :
00087         public DepListEntryHandled,
00088         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryNoHandlingRequired>
00089     {
00090     };
00091 
00092     /**
00093      * Represents a DepListEntry that has been handled successfully.
00094      *
00095      * \ingroup g_dep_list
00096      * \since 0.26
00097      * \nosubgrouping
00098      */
00099     class PALUDIS_VISIBLE DepListEntryHandledSuccess :
00100         public DepListEntryHandled,
00101         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryHandledSuccess>
00102     {
00103     };
00104 
00105     /**
00106      * Represents a DepListEntry that has been fetched successfully, but has
00107      * not yet started its install.
00108      *
00109      * \ingroup g_dep_list
00110      * \since 0.38
00111      * \nosubgrouping
00112      */
00113     class PALUDIS_VISIBLE DepListEntryHandledFetchSuccess :
00114         public DepListEntryHandled,
00115         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryHandledFetchSuccess>
00116     {
00117     };
00118 
00119     /**
00120      * Represents a DepListEntry that was skipped because of unsatisfied
00121      * dependencies.
00122      *
00123      * \ingroup g_dep_list
00124      * \since 0.26
00125      * \nosubgrouping
00126      */
00127     class PALUDIS_VISIBLE DepListEntryHandledSkippedUnsatisfied :
00128         public DepListEntryHandled,
00129         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryHandledSkippedUnsatisfied>,
00130         private PrivateImplementationPattern<DepListEntryHandledSkippedUnsatisfied>
00131     {
00132         public:
00133             ///\name Basic operations
00134             ///\{
00135 
00136             DepListEntryHandledSkippedUnsatisfied(const PackageDepSpec &);
00137             ~DepListEntryHandledSkippedUnsatisfied();
00138 
00139             ///\}
00140 
00141             /**
00142              * What PackageDepSpec was unsatisfied? If multiple specs were
00143              * unsatisfied, returns one of them.
00144              */
00145             const PackageDepSpec spec() const PALUDIS_ATTRIBUTE((warn_unused_result));
00146     };
00147 
00148     /**
00149      * Represents a DepListEntry that was skipped because of a dependency upon a
00150      * failed package.
00151      *
00152      * \ingroup g_dep_list
00153      * \since 0.26
00154      * \nosubgrouping
00155      */
00156     class PALUDIS_VISIBLE DepListEntryHandledSkippedDependent :
00157         public DepListEntryHandled,
00158         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryHandledSkippedDependent>,
00159         private PrivateImplementationPattern<DepListEntryHandledSkippedDependent>
00160     {
00161         public:
00162             ///\name Basic operations
00163             ///\{
00164 
00165             DepListEntryHandledSkippedDependent(const std::tr1::shared_ptr<const PackageID> &);
00166             ~DepListEntryHandledSkippedDependent();
00167 
00168             ///\}
00169 
00170             /**
00171              * Upon which PackageID are we dependent? If multiple dependent IDs are
00172              * unsatisfied, returns one of them.
00173              */
00174             const std::tr1::shared_ptr<const PackageID> id() const PALUDIS_ATTRIBUTE((warn_unused_result));
00175     };
00176 
00177     /**
00178      * Represents a DepListEntry that failed.
00179      *
00180      * \ingroup g_dep_list
00181      * \since 0.26
00182      * \nosubgrouping
00183      */
00184     class PALUDIS_VISIBLE DepListEntryHandledFailed :
00185         public DepListEntryHandled,
00186         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryHandledFailed>
00187     {
00188     };
00189 
00190     /**
00191      * Represents a DepListEntry that failed its fetch.
00192      *
00193      * \ingroup g_dep_list
00194      * \since 0.38
00195      * \nosubgrouping
00196      */
00197     class PALUDIS_VISIBLE DepListEntryHandledFetchFailed :
00198         public DepListEntryHandled,
00199         public ImplementAcceptMethods<DepListEntryHandled, DepListEntryHandledFetchFailed>
00200     {
00201     };
00202 }
00203 
00204 #endif

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