create_output_manager_info.hh

00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 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_CREATE_OUTPUT_MANAGER_INFO_HH
00021 #define PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_HH 1
00022 
00023 #include <paludis/create_output_manager_info-fwd.hh>
00024 #include <paludis/util/private_implementation_pattern.hh>
00025 #include <paludis/util/simple_visitor.hh>
00026 #include <paludis/util/attributes.hh>
00027 #include <paludis/util/type_list.hh>
00028 #include <paludis/action-fwd.hh>
00029 #include <paludis/package_id-fwd.hh>
00030 #include <paludis/repository-fwd.hh>
00031 
00032 namespace paludis
00033 {
00034     /**
00035      * Information for Environment::create_output_manager.
00036      *
00037      * \since 0.36
00038      * \ingroup g_environment
00039      * \see Environment::create_output_manager
00040      */
00041     class PALUDIS_VISIBLE CreateOutputManagerInfo :
00042         public virtual DeclareAbstractAcceptMethods<CreateOutputManagerInfo, MakeTypeList<
00043             CreateOutputManagerForPackageIDActionInfo,
00044             CreateOutputManagerForRepositorySyncInfo
00045         >::Type>
00046     {
00047     };
00048 
00049     /**
00050      * Information for Environment::create_output_manager, if we're performing a
00051      * PackageID action.
00052      *
00053      * \since 0.36
00054      * \ingroup g_environment
00055      * \see Environment::create_output_manager
00056      */
00057     class PALUDIS_VISIBLE CreateOutputManagerForPackageIDActionInfo :
00058         private PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>,
00059         public CreateOutputManagerInfo,
00060         public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForPackageIDActionInfo>
00061     {
00062         public:
00063             CreateOutputManagerForPackageIDActionInfo(
00064                     const std::tr1::shared_ptr<const PackageID> & id,
00065                     const Action & action,
00066                     const OutputExclusivity output_exclusivity);
00067 
00068             ~CreateOutputManagerForPackageIDActionInfo();
00069 
00070             const std::tr1::shared_ptr<const PackageID> package_id() const PALUDIS_ATTRIBUTE((warn_unused_result));
00071             const Action & action() const PALUDIS_ATTRIBUTE((warn_unused_result));
00072             OutputExclusivity output_exclusivity() const PALUDIS_ATTRIBUTE((warn_unused_result));
00073     };
00074 
00075     /**
00076      * Information for Environment::create_output_manager, if we're performing a
00077      * Repository sync.
00078      *
00079      * \since 0.36
00080      * \ingroup g_environment
00081      * \see Environment::create_output_manager
00082      */
00083     class PALUDIS_VISIBLE CreateOutputManagerForRepositorySyncInfo :
00084         private PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>,
00085         public CreateOutputManagerInfo,
00086         public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForRepositorySyncInfo>
00087     {
00088         public:
00089             CreateOutputManagerForRepositorySyncInfo(
00090                     const Repository & repo,
00091                     const OutputExclusivity);
00092 
00093             ~CreateOutputManagerForRepositorySyncInfo();
00094 
00095             const Repository & repository() const PALUDIS_ATTRIBUTE((warn_unused_result));
00096             OutputExclusivity output_exclusivity() const PALUDIS_ATTRIBUTE((warn_unused_result));
00097     };
00098 }
00099 
00100 #endif

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