aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-10 13:42:47 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-10 13:42:47 +0000
commitd1f6eca2de5bdecaea357131391224b349846f04 (patch)
treeed7786f0159a57888683c413cf171bc2f7cf230e
parent50bdeb2d6bb3e1ad074ab92b92b09f872590a8a2 (diff)
downloadpaludis-d1f6eca2de5bdecaea357131391224b349846f04.tar.gz
paludis-d1f6eca2de5bdecaea357131391224b349846f04.tar.xz
Split headers up some more
-rw-r--r--paludis/create_output_manager_info-fwd.hh30
-rw-r--r--paludis/create_output_manager_info.cc97
-rw-r--r--paludis/create_output_manager_info.hh95
-rw-r--r--paludis/environment.cc73
-rw-r--r--paludis/environment.hh63
-rw-r--r--paludis/files.m41
-rw-r--r--paludis/install_task.cc1
-rw-r--r--paludis/uninstall_task.cc1
-rw-r--r--src/clients/accerso/accerso.cc1
9 files changed, 227 insertions, 135 deletions
diff --git a/paludis/create_output_manager_info-fwd.hh b/paludis/create_output_manager_info-fwd.hh
new file mode 100644
index 0000000..897ab1e
--- /dev/null
+++ b/paludis/create_output_manager_info-fwd.hh
@@ -0,0 +1,30 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2009 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_FWD_HH
+#define PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_FWD_HH 1
+
+namespace paludis
+{
+ class CreateOutputManagerInfo;
+ class CreateOutputManagerForPackageIDActionInfo;
+ class CreateOutputManagerForRepositorySyncInfo;
+}
+
+#endif
diff --git a/paludis/create_output_manager_info.cc b/paludis/create_output_manager_info.cc
new file mode 100644
index 0000000..0ce7224
--- /dev/null
+++ b/paludis/create_output_manager_info.cc
@@ -0,0 +1,97 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2009 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/create_output_manager_info.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+
+using namespace paludis;
+
+namespace paludis
+{
+ template <>
+ struct Implementation<CreateOutputManagerForPackageIDActionInfo>
+ {
+ const std::tr1::shared_ptr<const PackageID> id;
+ const Action & action;
+
+ Implementation(const std::tr1::shared_ptr<const PackageID> & i,
+ const Action & a) :
+ id(i),
+ action(a)
+ {
+ }
+ };
+
+ template <>
+ struct Implementation<CreateOutputManagerForRepositorySyncInfo>
+ {
+ const Repository & repo;
+
+ Implementation(const Repository & r) :
+ repo(r)
+ {
+ }
+ };
+}
+
+CreateOutputManagerForPackageIDActionInfo::CreateOutputManagerForPackageIDActionInfo(
+ const std::tr1::shared_ptr<const PackageID> & i,
+ const Action & a) :
+ PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>(
+ new Implementation<CreateOutputManagerForPackageIDActionInfo>(i, a))
+{
+}
+
+CreateOutputManagerForPackageIDActionInfo::~CreateOutputManagerForPackageIDActionInfo()
+{
+}
+
+const std::tr1::shared_ptr<const PackageID>
+CreateOutputManagerForPackageIDActionInfo::package_id() const
+{
+ return _imp->id;
+}
+
+const Action &
+CreateOutputManagerForPackageIDActionInfo::action() const
+{
+ return _imp->action;
+}
+
+CreateOutputManagerForRepositorySyncInfo::CreateOutputManagerForRepositorySyncInfo(
+ const Repository & r) :
+ PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>(
+ new Implementation<CreateOutputManagerForRepositorySyncInfo>(r))
+{
+}
+
+CreateOutputManagerForRepositorySyncInfo::~CreateOutputManagerForRepositorySyncInfo()
+{
+}
+
+const Repository &
+CreateOutputManagerForRepositorySyncInfo::repository() const
+{
+ return _imp->repo;
+}
+
+template class PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>;
+template class PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>;
+
+
diff --git a/paludis/create_output_manager_info.hh b/paludis/create_output_manager_info.hh
new file mode 100644
index 0000000..fc6fdb2
--- /dev/null
+++ b/paludis/create_output_manager_info.hh
@@ -0,0 +1,95 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2009 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_HH
+#define PALUDIS_GUARD_PALUDIS_CREATE_OUTPUT_MANAGER_INFO_HH 1
+
+#include <paludis/create_output_manager_info-fwd.hh>
+#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/attributes.hh>
+#include <paludis/util/type_list.hh>
+#include <paludis/action-fwd.hh>
+#include <paludis/package_id-fwd.hh>
+#include <paludis/repository-fwd.hh>
+
+namespace paludis
+{
+ /**
+ * Information for Environment::create_output_manager.
+ *
+ * \since 0.36
+ * \ingroup g_environment
+ * \see Environment::create_output_manager
+ */
+ class PALUDIS_VISIBLE CreateOutputManagerInfo :
+ public virtual DeclareAbstractAcceptMethods<CreateOutputManagerInfo, MakeTypeList<
+ CreateOutputManagerForPackageIDActionInfo,
+ CreateOutputManagerForRepositorySyncInfo
+ >::Type>
+ {
+ };
+
+ /**
+ * Information for Environment::create_output_manager, if we're performing a
+ * PackageID action.
+ *
+ * \since 0.36
+ * \ingroup g_environment
+ * \see Environment::create_output_manager
+ */
+ class PALUDIS_VISIBLE CreateOutputManagerForPackageIDActionInfo :
+ private PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>,
+ public CreateOutputManagerInfo,
+ public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForPackageIDActionInfo>
+ {
+ public:
+ CreateOutputManagerForPackageIDActionInfo(
+ const std::tr1::shared_ptr<const PackageID> & id,
+ const Action & action);
+
+ ~CreateOutputManagerForPackageIDActionInfo();
+
+ const std::tr1::shared_ptr<const PackageID> package_id() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ const Action & action() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+
+ /**
+ * Information for Environment::create_output_manager, if we're performing a
+ * Repository sync.
+ *
+ * \since 0.36
+ * \ingroup g_environment
+ * \see Environment::create_output_manager
+ */
+ class PALUDIS_VISIBLE CreateOutputManagerForRepositorySyncInfo :
+ private PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>,
+ public CreateOutputManagerInfo,
+ public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForRepositorySyncInfo>
+ {
+ public:
+ CreateOutputManagerForRepositorySyncInfo(const Repository & repo);
+
+ ~CreateOutputManagerForRepositorySyncInfo();
+
+ const Repository & repository() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+}
+
+#endif
diff --git a/paludis/environment.cc b/paludis/environment.cc
index a59b2c7..9046b47 100644
--- a/paludis/environment.cc
+++ b/paludis/environment.cc
@@ -23,7 +23,6 @@
#include <paludis/util/sequence-impl.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/wrapped_output_iterator-impl.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
using namespace paludis;
@@ -34,75 +33,3 @@ Environment::~Environment()
{
}
-namespace paludis
-{
- template <>
- struct Implementation<CreateOutputManagerForPackageIDActionInfo>
- {
- const std::tr1::shared_ptr<const PackageID> id;
- const Action & action;
-
- Implementation(const std::tr1::shared_ptr<const PackageID> & i,
- const Action & a) :
- id(i),
- action(a)
- {
- }
- };
-
- template <>
- struct Implementation<CreateOutputManagerForRepositorySyncInfo>
- {
- const Repository & repo;
-
- Implementation(const Repository & r) :
- repo(r)
- {
- }
- };
-}
-
-CreateOutputManagerForPackageIDActionInfo::CreateOutputManagerForPackageIDActionInfo(
- const std::tr1::shared_ptr<const PackageID> & i,
- const Action & a) :
- PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>(
- new Implementation<CreateOutputManagerForPackageIDActionInfo>(i, a))
-{
-}
-
-CreateOutputManagerForPackageIDActionInfo::~CreateOutputManagerForPackageIDActionInfo()
-{
-}
-
-const std::tr1::shared_ptr<const PackageID>
-CreateOutputManagerForPackageIDActionInfo::package_id() const
-{
- return _imp->id;
-}
-
-const Action &
-CreateOutputManagerForPackageIDActionInfo::action() const
-{
- return _imp->action;
-}
-
-CreateOutputManagerForRepositorySyncInfo::CreateOutputManagerForRepositorySyncInfo(
- const Repository & r) :
- PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>(
- new Implementation<CreateOutputManagerForRepositorySyncInfo>(r))
-{
-}
-
-CreateOutputManagerForRepositorySyncInfo::~CreateOutputManagerForRepositorySyncInfo()
-{
-}
-
-const Repository &
-CreateOutputManagerForRepositorySyncInfo::repository() const
-{
- return _imp->repo;
-}
-
-template class PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>;
-template class PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>;
-
diff --git a/paludis/environment.hh b/paludis/environment.hh
index e1cdd08..670a25a 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -39,7 +39,7 @@
#include <paludis/selection-fwd.hh>
#include <paludis/metadata_key_holder.hh>
#include <paludis/choice-fwd.hh>
-#include <paludis/action-fwd.hh>
+#include <paludis/create_output_manager_info-fwd.hh>
/** \file
* Declarations for the Environment class.
@@ -54,67 +54,6 @@
namespace paludis
{
/**
- * Information for Environment::create_output_manager.
- *
- * \since 0.36
- * \ingroup g_environment
- * \see Environment::create_output_manager
- */
- class PALUDIS_VISIBLE CreateOutputManagerInfo :
- public virtual DeclareAbstractAcceptMethods<CreateOutputManagerInfo, MakeTypeList<
- CreateOutputManagerForPackageIDActionInfo,
- CreateOutputManagerForRepositorySyncInfo
- >::Type>
- {
- };
-
- /**
- * Information for Environment::create_output_manager, if we're performing a
- * PackageID action.
- *
- * \since 0.36
- * \ingroup g_environment
- * \see Environment::create_output_manager
- */
- class PALUDIS_VISIBLE CreateOutputManagerForPackageIDActionInfo :
- private PrivateImplementationPattern<CreateOutputManagerForPackageIDActionInfo>,
- public CreateOutputManagerInfo,
- public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForPackageIDActionInfo>
- {
- public:
- CreateOutputManagerForPackageIDActionInfo(
- const std::tr1::shared_ptr<const PackageID> & id,
- const Action & action);
-
- ~CreateOutputManagerForPackageIDActionInfo();
-
- const std::tr1::shared_ptr<const PackageID> package_id() const PALUDIS_ATTRIBUTE((warn_unused_result));
- const Action & action() const PALUDIS_ATTRIBUTE((warn_unused_result));
- };
-
- /**
- * Information for Environment::create_output_manager, if we're performing a
- * Repository sync.
- *
- * \since 0.36
- * \ingroup g_environment
- * \see Environment::create_output_manager
- */
- class PALUDIS_VISIBLE CreateOutputManagerForRepositorySyncInfo :
- private PrivateImplementationPattern<CreateOutputManagerForRepositorySyncInfo>,
- public CreateOutputManagerInfo,
- public ImplementAcceptMethods<CreateOutputManagerInfo, CreateOutputManagerForRepositorySyncInfo>
- {
- public:
- CreateOutputManagerForRepositorySyncInfo(
- const Repository & repo);
-
- ~CreateOutputManagerForRepositorySyncInfo();
-
- const Repository & repository() const PALUDIS_ATTRIBUTE((warn_unused_result));
- };
-
- /**
* Represents a working environment, which contains an available packages
* database and provides various methods for querying package visibility
* and options.
diff --git a/paludis/files.m4 b/paludis/files.m4
index 883d92d..1f5ad46 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -13,6 +13,7 @@ add(`action', `hh', `cc', `fwd', `se')
add(`action_names', `hh', `cc', `fwd')
add(`choice', `hh', `cc', `fwd')
add(`contents', `hh', `cc', `fwd')
+add(`create_output_manager_info', `hh', `cc', `fwd')
add(`dep_label', `hh', `cc', `fwd')
add(`dep_list', `hh', `cc', `fwd', `test', `fwd')
add(`dep_list_exceptions', `hh', `cc')
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 7c8600f..ee0cd1a 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -51,6 +51,7 @@
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/standard_output_manager.hh>
#include <paludis/handled_information.hh>
+#include <paludis/create_output_manager_info.hh>
#include <tr1/functional>
#include <sstream>
#include <functional>
diff --git a/paludis/uninstall_task.cc b/paludis/uninstall_task.cc
index cef0aaa..0fbe06c 100644
--- a/paludis/uninstall_task.cc
+++ b/paludis/uninstall_task.cc
@@ -39,6 +39,7 @@
#include <paludis/hook.hh>
#include <paludis/dep_tag.hh>
#include <paludis/repository.hh>
+#include <paludis/create_output_manager_info.hh>
#include <tr1/functional>
#include <map>
#include <set>
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index c4a3cfc..70b49ff 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -33,6 +33,7 @@
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/standard_output_manager.hh>
#include <paludis/util/safe_ofstream.hh>
+#include <paludis/create_output_manager_info.hh>
#include <paludis/environments/no_config/no_config_environment.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>