aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-06-01 13:23:25 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-06-01 13:23:25 +0000
commit86ebe09b66faeec132016b04fd192752b0874d50 (patch)
tree1e4adf78c1f13d76d018d7a1133b4a69f11d6ac6
parentf0367218d0a0dbffbb46ce627318e54baa844952 (diff)
downloadpaludis-86ebe09b66faeec132016b04fd192752b0874d50.tar.gz
paludis-86ebe09b66faeec132016b04fd192752b0874d50.tar.xz
Code cleanup. Fixes: ticket:266, ticket:267
-rw-r--r--paludis/args/args_group.cc1
-rw-r--r--paludis/args/args_handler.cc1
-rw-r--r--paludis/args/args_option.cc1
-rw-r--r--paludis/config_file.cc1
-rw-r--r--paludis/contents.cc1
-rw-r--r--paludis/dep_list/dep_list.cc1
-rw-r--r--paludis/dep_list/options.cc1
-rw-r--r--paludis/dep_list/query_visitor.cc1
-rw-r--r--paludis/dep_list/show_suggest_visitor.cc1
-rw-r--r--paludis/dep_list/uninstall_list.cc1
-rw-r--r--paludis/dep_spec.cc3
-rw-r--r--paludis/dep_spec_flattener.cc1
-rw-r--r--paludis/dep_spec_pretty_printer.cc2
-rw-r--r--paludis/dep_tag.cc3
-rw-r--r--paludis/distribution.cc5
-rw-r--r--paludis/distribution.hh1
-rw-r--r--paludis/eapi.cc5
-rw-r--r--paludis/environment.cc1
-rw-r--r--paludis/environment_implementation.cc1
-rw-r--r--paludis/environments/adapted/adapted_environment.cc2
-rw-r--r--paludis/environments/environment_maker.cc4
-rw-r--r--paludis/environments/no_config/no_config_environment.cc1
-rw-r--r--paludis/environments/paludis/bashable_conf.cc1
-rw-r--r--paludis/environments/paludis/keywords_conf.cc1
-rw-r--r--paludis/environments/paludis/licenses_conf.cc1
-rw-r--r--paludis/environments/paludis/mirrors_conf.cc1
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc1
-rw-r--r--paludis/environments/paludis/paludis_config.cc1
-rw-r--r--paludis/environments/paludis/paludis_environment.cc2
-rw-r--r--paludis/environments/paludis/use_conf.cc1
-rw-r--r--paludis/environments/portage/portage_environment.cc2
-rw-r--r--paludis/environments/test/test_environment.cc1
-rw-r--r--paludis/hook.cc3
-rw-r--r--paludis/hooker.cc1
-rw-r--r--paludis/host_tuple_name.cc2
-rw-r--r--paludis/mask_reasons.cc4
-rw-r--r--paludis/merger/unmerger.cc1
-rw-r--r--paludis/package_database.cc1
-rw-r--r--paludis/portage_dep_lexer.cc1
-rw-r--r--paludis/qa/broken_global_variables_check.cc1
-rw-r--r--paludis/qa/changelog_check.cc3
-rw-r--r--paludis/qa/check_result.cc3
-rw-r--r--paludis/qa/defaults_check.cc1
-rw-r--r--paludis/qa/deprecated_functions_check.cc1
-rw-r--r--paludis/qa/digest_collisions_check.cc1
-rw-r--r--paludis/qa/ebuild_check.cc4
-rw-r--r--paludis/qa/ebuild_count_check.cc1
-rw-r--r--paludis/qa/ebuild_name_check.cc1
-rw-r--r--paludis/qa/file_check.cc4
-rw-r--r--paludis/qa/files_dir_size_check.cc3
-rw-r--r--paludis/qa/function_check.cc1
-rw-r--r--paludis/qa/glep_31_check.cc3
-rw-r--r--paludis/qa/gpg_check.cc1
-rw-r--r--paludis/qa/header_check.cc1
-rw-r--r--paludis/qa/message.cc3
-rw-r--r--paludis/qa/metadata_check.cc1
-rw-r--r--paludis/qa/metadata_file.cc1
-rw-r--r--paludis/qa/package_dir_check.cc4
-rw-r--r--paludis/qa/per_profile_ebuild_check.cc3
-rw-r--r--paludis/qa/profile_check.cc3
-rw-r--r--paludis/qa/profiles_check.cc3
-rw-r--r--paludis/qa/root_check.cc1
-rw-r--r--paludis/qa/subshell_die_check.cc1
-rw-r--r--paludis/qa/variable_assigns_check.cc1
-rw-r--r--paludis/qa/whitespace_check.cc1
-rw-r--r--paludis/repositories/cran/cran_dep_parser.cc1
-rw-r--r--paludis/repositories/cran/cran_description.cc1
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc1
-rw-r--r--paludis/repositories/cran/cran_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc1
-rw-r--r--paludis/repositories/gentoo/eapi_phase.cc1
-rw-r--r--paludis/repositories/gentoo/ebin_entries.cc1
-rw-r--r--paludis/repositories/gentoo/ebuild_entries.cc1
-rw-r--r--paludis/repositories/gentoo/eclass_mtimes.cc1
-rw-r--r--paludis/repositories/gentoo/glsa.cc1
-rw-r--r--paludis/repositories/gentoo/layout.cc3
-rw-r--r--paludis/repositories/gentoo/portage_repository.cc1
-rw-r--r--paludis/repositories/gentoo/portage_repository_entries.cc3
-rw-r--r--paludis/repositories/gentoo/portage_repository_news.cc1
-rw-r--r--paludis/repositories/gentoo/portage_repository_profile.cc1
-rw-r--r--paludis/repositories/gentoo/portage_repository_profile_file.cc2
-rw-r--r--paludis/repositories/gentoo/portage_repository_sets.cc1
-rw-r--r--paludis/repositories/gentoo/traditional_layout.cc2
-rw-r--r--paludis/repositories/gentoo/use_desc.cc2
-rw-r--r--paludis/repositories/gentoo/vdb_merger.cc1
-rw-r--r--paludis/repositories/gentoo/vdb_repository.cc1
-rw-r--r--paludis/repositories/gentoo/vdb_unmerger.cc1
-rw-r--r--paludis/repositories/repository_maker.cc4
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc1
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc1
-rw-r--r--paludis/repository.cc3
-rw-r--r--paludis/repository_name_cache.cc2
-rw-r--r--paludis/selinux/security_context.cc5
-rw-r--r--paludis/set_file.cc1
-rw-r--r--paludis/sohooks_TEST.cc1
-rw-r--r--paludis/tasks/install_task.cc1
-rw-r--r--paludis/tasks/report_task.cc1
-rw-r--r--paludis/tasks/stage_builder_task.cc1
-rw-r--r--paludis/tasks/sync_task.cc1
-rw-r--r--paludis/tasks/uninstall_task.cc1
-rw-r--r--paludis/util/destringify.cc1
-rw-r--r--paludis/util/destringify_TEST.cc1
-rw-r--r--paludis/util/dir_iterator.cc1
-rw-r--r--paludis/util/exception.cc1
-rw-r--r--paludis/util/exception.hh6
-rw-r--r--paludis/util/files.m44
-rw-r--r--paludis/util/graph-impl.hh1
-rw-r--r--paludis/util/graph.hh1
-rw-r--r--paludis/util/instantiation_policy-impl.hh92
-rw-r--r--paludis/util/instantiation_policy.hh99
-rw-r--r--paludis/util/instantiation_policy_TEST.cc1
-rw-r--r--paludis/util/is_file_with_extension.cc2
-rw-r--r--paludis/util/log.cc5
-rw-r--r--paludis/util/log.hh1
-rw-r--r--paludis/util/options.cc1
-rw-r--r--paludis/util/pipe.cc3
-rw-r--r--paludis/util/private_implementation_pattern-impl.hh70
-rw-r--r--paludis/util/private_implementation_pattern.hh35
-rw-r--r--paludis/util/pstream.cc1
-rw-r--r--paludis/util/system.cc1
-rw-r--r--paludis/util/system.hh2
-rw-r--r--paludis/util/tokeniser.cc5
-rw-r--r--paludis/util/virtual_constructor_TEST.cc1
-rw-r--r--paludis/version_metadata.cc1
-rw-r--r--paludis/version_operator.hh1
-rw-r--r--paludis/version_requirements.cc3
-rw-r--r--paludis/version_spec.cc1
-rw-r--r--python/exception.cc5
-rw-r--r--ruby/paludis_ruby.cc4
-rw-r--r--src/clients/adjutrix/command_line.cc3
-rw-r--r--src/clients/contrarius/command_line.cc3
-rw-r--r--src/clients/contrarius/target_config.cc4
-rw-r--r--src/clients/inquisitio/command_line.cc3
-rw-r--r--src/clients/inquisitio/description_extractor.cc1
-rw-r--r--src/clients/inquisitio/extractor.cc4
-rw-r--r--src/clients/inquisitio/matcher.cc4
-rw-r--r--src/clients/inquisitio/matcher.hh1
-rw-r--r--src/clients/inquisitio/name_extractor.cc2
-rw-r--r--src/clients/inquisitio/pcre_matcher.cc1
-rw-r--r--src/clients/inquisitio/text_matcher.cc1
-rw-r--r--src/clients/paludis/command_line.cc3
-rw-r--r--src/clients/qualudis/qualudis_command_line.cc3
-rw-r--r--src/common_args/deps_option_arg.cc3
-rw-r--r--src/output/console_query_task.cc1
-rw-r--r--test/test_framework.cc1
146 files changed, 411 insertions, 145 deletions
diff --git a/paludis/args/args_group.cc b/paludis/args/args_group.cc
index eaa0eea9b..f833611bf 100644
--- a/paludis/args/args_group.cc
+++ b/paludis/args/args_group.cc
@@ -18,6 +18,7 @@
*/
#include "args.hh"
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
/** \file
diff --git a/paludis/args/args_handler.cc b/paludis/args/args_handler.cc
index 341154bd8..fbff4da83 100644
--- a/paludis/args/args_handler.cc
+++ b/paludis/args/args_handler.cc
@@ -22,6 +22,7 @@
#include <paludis/util/system.hh>
#include <paludis/util/join.hh>
#include <paludis/util/iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/visitor-impl.hh>
#include <algorithm>
#include <sstream>
diff --git a/paludis/args/args_option.cc b/paludis/args/args_option.cc
index 9013499b6..b8fc2f43f 100644
--- a/paludis/args/args_option.cc
+++ b/paludis/args/args_option.cc
@@ -19,6 +19,7 @@
#include "args.hh"
#include "args_error.hh"
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <set>
#include <vector>
#include <algorithm>
diff --git a/paludis/config_file.cc b/paludis/config_file.cc
index 17f3c47c0..4c25186e6 100644
--- a/paludis/config_file.cc
+++ b/paludis/config_file.cc
@@ -26,6 +26,7 @@
#include <paludis/util/strip.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <fstream>
#include <istream>
diff --git a/paludis/contents.cc b/paludis/contents.cc
index f69ff3d1b..cdeb7eb21 100644
--- a/paludis/contents.cc
+++ b/paludis/contents.cc
@@ -19,6 +19,7 @@
#include "contents.hh"
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
/** \file
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index 0c5b00b3f..9f22dc0f5 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -37,6 +37,7 @@
#include <paludis/util/iterator.hh>
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/save.hh>
#include <paludis/util/stringify.hh>
diff --git a/paludis/dep_list/options.cc b/paludis/dep_list/options.cc
index 48354a845..355ca2eae 100644
--- a/paludis/dep_list/options.cc
+++ b/paludis/dep_list/options.cc
@@ -20,6 +20,7 @@
#include "options.hh"
#include <ostream>
#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
diff --git a/paludis/dep_list/query_visitor.cc b/paludis/dep_list/query_visitor.cc
index 014519035..c2919b7d4 100644
--- a/paludis/dep_list/query_visitor.cc
+++ b/paludis/dep_list/query_visitor.cc
@@ -22,6 +22,7 @@
#include <paludis/dep_list/range_rewriter.hh>
#include <paludis/package_database.hh>
#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <algorithm>
using namespace paludis;
diff --git a/paludis/dep_list/show_suggest_visitor.cc b/paludis/dep_list/show_suggest_visitor.cc
index 792f1f287..fa04a21bf 100644
--- a/paludis/dep_list/show_suggest_visitor.cc
+++ b/paludis/dep_list/show_suggest_visitor.cc
@@ -23,6 +23,7 @@
#include <paludis/package_database.hh>
#include <paludis/util/log.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
using namespace paludis;
diff --git a/paludis/dep_list/uninstall_list.cc b/paludis/dep_list/uninstall_list.cc
index 0d291b024..d4bd67f12 100644
--- a/paludis/dep_list/uninstall_list.cc
+++ b/paludis/dep_list/uninstall_list.cc
@@ -27,6 +27,7 @@ using namespace paludis;
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/hashed_containers.hh>
#include <paludis/match_package.hh>
#include <paludis/version_metadata.hh>
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index 1d68c44be..6f42f860d 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -26,7 +26,8 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/visitor-impl.hh>
-
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/stringify.hh>
#include <list>
#include <map>
diff --git a/paludis/dep_spec_flattener.cc b/paludis/dep_spec_flattener.cc
index 56864a81a..2323c74f3 100644
--- a/paludis/dep_spec_flattener.cc
+++ b/paludis/dep_spec_flattener.cc
@@ -20,6 +20,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_flattener.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
#include <algorithm>
diff --git a/paludis/dep_spec_pretty_printer.cc b/paludis/dep_spec_pretty_printer.cc
index de0356348..519f51ec9 100644
--- a/paludis/dep_spec_pretty_printer.cc
+++ b/paludis/dep_spec_pretty_printer.cc
@@ -18,10 +18,12 @@
*/
#include <algorithm>
+#include <sstream>
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_pretty_printer.hh>
#include <paludis/util/save.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
/** \file
* Implementation of dep_spec_pretty_printer.hh.
diff --git a/paludis/dep_tag.cc b/paludis/dep_tag.cc
index 0faa68c0f..7cc0444b6 100644
--- a/paludis/dep_tag.cc
+++ b/paludis/dep_tag.cc
@@ -20,6 +20,7 @@
#include "dep_tag.hh"
#include <paludis/util/virtual_constructor-impl.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
/** \file
* Implementation for DepTag, DepTagCategory etc.
@@ -43,6 +44,8 @@ template class Visits<const GeneralSetDepTag>;
template class Visits<const GLSADepTag>;
template class Visits<const DependencyDepTag>;
+template class InstantiationPolicy<DepTagCategoryMaker, instantiation_method::SingletonTag>;
+
#include <paludis/dep_tag-sr.cc>
namespace
diff --git a/paludis/distribution.cc b/paludis/distribution.cc
index 689df04c3..a8488eef9 100644
--- a/paludis/distribution.cc
+++ b/paludis/distribution.cc
@@ -26,10 +26,15 @@
#include <paludis/util/system.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include "config.h"
using namespace paludis;
+template class InstantiationPolicy<DistributionData, instantiation_method::SingletonTag>;
+
#include <paludis/distribution-sr.cc>
DistributionConfigurationError::DistributionConfigurationError(const std::string & s) throw () :
diff --git a/paludis/distribution.hh b/paludis/distribution.hh
index b9bcfd5a3..61cc25ddb 100644
--- a/paludis/distribution.hh
+++ b/paludis/distribution.hh
@@ -26,6 +26,7 @@
#include <paludis/util/sr.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/instantiation_policy.hh>
+#include <paludis/util/tr1_memory.hh>
namespace paludis
{
diff --git a/paludis/eapi.cc b/paludis/eapi.cc
index 7caaf4050..5e32c4e6d 100644
--- a/paludis/eapi.cc
+++ b/paludis/eapi.cc
@@ -29,12 +29,17 @@
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/config_file.hh>
using namespace paludis;
#include <paludis/eapi-sr.cc>
+template class InstantiationPolicy<EAPIData, instantiation_method::SingletonTag>;
+
namespace paludis
{
template<>
diff --git a/paludis/environment.cc b/paludis/environment.cc
index cddd3ac5f..efa5ee789 100644
--- a/paludis/environment.cc
+++ b/paludis/environment.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/environment.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index e685b334d..1e41d2ae9 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -24,6 +24,7 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/save.hh>
#include <paludis/eapi.hh>
#include <algorithm>
diff --git a/paludis/environments/adapted/adapted_environment.cc b/paludis/environments/adapted/adapted_environment.cc
index eaa6793f7..8b67c625f 100644
--- a/paludis/environments/adapted/adapted_environment.cc
+++ b/paludis/environments/adapted/adapted_environment.cc
@@ -20,6 +20,8 @@
#include "adapted_environment.hh"
#include <paludis/hashed_containers.hh>
#include <paludis/dep_spec.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/match_package.hh>
using namespace paludis;
diff --git a/paludis/environments/environment_maker.cc b/paludis/environments/environment_maker.cc
index 142a9ca04..0b6c1bd87 100644
--- a/paludis/environments/environment_maker.cc
+++ b/paludis/environments/environment_maker.cc
@@ -23,6 +23,8 @@
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/system.hh>
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/distribution.hh>
#include <paludis/about.hh>
#include <list>
@@ -36,6 +38,8 @@ template class VirtualConstructor<std::string,
tr1::shared_ptr<Environment> (*) (const std::string &),
virtual_constructor_not_found::ThrowException<NoSuchEnvironmentTypeError> >;
+template class InstantiationPolicy<EnvironmentMaker, instantiation_method::SingletonTag>;
+
NoSuchEnvironmentTypeError::NoSuchEnvironmentTypeError(const std::string & format) throw ():
ConfigurationError("No available maker for environment type '" + format + "'")
{
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index 6635cd041..ccaff899e 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -23,6 +23,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/repositories/repository_maker.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/config_file.hh>
#include <paludis/distribution.hh>
#include <paludis/package_database.hh>
diff --git a/paludis/environments/paludis/bashable_conf.cc b/paludis/environments/paludis/bashable_conf.cc
index e5a5d9f54..3265f5e66 100644
--- a/paludis/environments/paludis/bashable_conf.cc
+++ b/paludis/environments/paludis/bashable_conf.cc
@@ -22,6 +22,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/pstream.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/log.hh>
using namespace paludis;
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index 8f88534fc..725bd478c 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -27,6 +27,7 @@
#include <paludis/environments/paludis/paludis_environment.hh>
#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tokeniser.hh>
#include <list>
#include <vector>
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 8fefdef46..e2892bba4 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -28,6 +28,7 @@
#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
#include <vector>
#include <map>
diff --git a/paludis/environments/paludis/mirrors_conf.cc b/paludis/environments/paludis/mirrors_conf.cc
index f0d608938..421841ec7 100644
--- a/paludis/environments/paludis/mirrors_conf.cc
+++ b/paludis/environments/paludis/mirrors_conf.cc
@@ -25,6 +25,7 @@
#include <paludis/environments/paludis/paludis_environment.hh>
#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/collection_concrete.hh>
#include <vector>
diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc
index 860791efc..8510750f7 100644
--- a/paludis/environments/paludis/package_mask_conf.cc
+++ b/paludis/environments/paludis/package_mask_conf.cc
@@ -28,6 +28,7 @@
#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
#include <algorithm>
#include <paludis/util/tr1_functional.hh>
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 21e43c224..dbd655d95 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -39,6 +39,7 @@
#include <paludis/util/sr.hh>
#include <paludis/util/system.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tr1_functional.hh>
#include <fstream>
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 068ba899c..90b743424 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -37,7 +37,9 @@
#include <paludis/util/log.hh>
#include <paludis/util/system.hh>
#include <paludis/util/dir_iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/save.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/tr1_functional.hh>
#include <functional>
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index 1cc6d6e76..439e7a2ae 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -28,6 +28,7 @@
#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/collection_concrete.hh>
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 7b3faff74..055efa3b2 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -21,6 +21,8 @@
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/save.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/dir_iterator.hh>
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 81f13e96c..53434675e 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/environments/test/test_environment.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/package_database.hh>
#include <string>
diff --git a/paludis/hook.cc b/paludis/hook.cc
index b19e5bee3..7c3602e24 100644
--- a/paludis/hook.cc
+++ b/paludis/hook.cc
@@ -19,6 +19,9 @@
*/
#include "hook.hh"
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
#include <map>
using namespace paludis;
diff --git a/paludis/hooker.cc b/paludis/hooker.cc
index b18a1a34a..88171c9c1 100644
--- a/paludis/hooker.cc
+++ b/paludis/hooker.cc
@@ -29,6 +29,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/graph.hh>
#include <paludis/util/graph-impl.hh>
diff --git a/paludis/host_tuple_name.cc b/paludis/host_tuple_name.cc
index fef968d9f..3be175046 100644
--- a/paludis/host_tuple_name.cc
+++ b/paludis/host_tuple_name.cc
@@ -21,6 +21,8 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/operators.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/stringify.hh>
+#include <utility>
#include <vector>
#include <ostream>
diff --git a/paludis/mask_reasons.cc b/paludis/mask_reasons.cc
index 842272fe7..8b36d9003 100644
--- a/paludis/mask_reasons.cc
+++ b/paludis/mask_reasons.cc
@@ -19,7 +19,11 @@
#include <paludis/mask_reasons.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/exception.hh>
#include <ostream>
+
+using namespace paludis;
+
#include <paludis/mask_reasons-se.cc>
diff --git a/paludis/merger/unmerger.cc b/paludis/merger/unmerger.cc
index 2ce815475..b8bf3af21 100644
--- a/paludis/merger/unmerger.cc
+++ b/paludis/merger/unmerger.cc
@@ -21,6 +21,7 @@
#include "unmerger.hh"
#include <paludis/environment.hh>
#include <paludis/hook.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 84f4a833e..8b5ed1b92 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -21,6 +21,7 @@
#include <paludis/match_package.hh>
#include <paludis/package_database.hh>
#include <paludis/util/iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/query.hh>
diff --git a/paludis/portage_dep_lexer.cc b/paludis/portage_dep_lexer.cc
index 050526d82..867180ebb 100644
--- a/paludis/portage_dep_lexer.cc
+++ b/paludis/portage_dep_lexer.cc
@@ -19,6 +19,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/portage_dep_lexer.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/tokeniser.hh>
#include <vector>
diff --git a/paludis/qa/broken_global_variables_check.cc b/paludis/qa/broken_global_variables_check.cc
index 1512550be..53c3219c6 100644
--- a/paludis/qa/broken_global_variables_check.cc
+++ b/paludis/qa/broken_global_variables_check.cc
@@ -21,6 +21,7 @@
#include <paludis/qa/broken_global_variables_check.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
using namespace paludis;
diff --git a/paludis/qa/changelog_check.cc b/paludis/qa/changelog_check.cc
index 5aeb7ce1b..68e3fc61a 100644
--- a/paludis/qa/changelog_check.cc
+++ b/paludis/qa/changelog_check.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -20,6 +20,7 @@
#include <fstream>
#include <paludis/qa/changelog_check.hh>
#include <paludis/util/pstream.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/check_result.cc b/paludis/qa/check_result.cc
index 0be8257c0..999e0b668 100644
--- a/paludis/qa/check_result.cc
+++ b/paludis/qa/check_result.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -18,6 +18,7 @@
*/
#include <paludis/qa/check_result.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/defaults_check.cc b/paludis/qa/defaults_check.cc
index b0db34deb..815ae8ff7 100644
--- a/paludis/qa/defaults_check.cc
+++ b/paludis/qa/defaults_check.cc
@@ -20,6 +20,7 @@
#include <fstream>
#include <paludis/qa/defaults_check.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
using namespace paludis;
diff --git a/paludis/qa/deprecated_functions_check.cc b/paludis/qa/deprecated_functions_check.cc
index 9edfcb709..ca25613ff 100644
--- a/paludis/qa/deprecated_functions_check.cc
+++ b/paludis/qa/deprecated_functions_check.cc
@@ -23,6 +23,7 @@
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
#include <set>
diff --git a/paludis/qa/digest_collisions_check.cc b/paludis/qa/digest_collisions_check.cc
index 37cca443a..6ab6bcb1b 100644
--- a/paludis/qa/digest_collisions_check.cc
+++ b/paludis/qa/digest_collisions_check.cc
@@ -22,6 +22,7 @@
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/stringify.hh>
#include <fstream>
#include <map>
#include <vector>
diff --git a/paludis/qa/ebuild_check.cc b/paludis/qa/ebuild_check.cc
index 20d5bb340..99d8a9826 100644
--- a/paludis/qa/ebuild_check.cc
+++ b/paludis/qa/ebuild_check.cc
@@ -35,7 +35,7 @@
#include <paludis/qa/src_uri_check.hh>
#include <paludis/qa/pdepend_overlap_check.hh>
#include <paludis/qa/slot_check.hh>
-
+#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/virtual_constructor-impl.hh>
using namespace paludis;
@@ -44,6 +44,8 @@ using namespace paludis::qa;
template class VirtualConstructor<std::string, tr1::shared_ptr<EbuildCheck> (*) (),
virtual_constructor_not_found::ThrowException<NoSuchEbuildCheckTypeError> >;
+template class InstantiationPolicy<EbuildCheckMaker, instantiation_method::SingletonTag>;
+
#include <paludis/qa/ebuild_check-sr.cc>
EbuildCheck::EbuildCheck()
diff --git a/paludis/qa/ebuild_count_check.cc b/paludis/qa/ebuild_count_check.cc
index cf5ebd007..7cf83af0a 100644
--- a/paludis/qa/ebuild_count_check.cc
+++ b/paludis/qa/ebuild_count_check.cc
@@ -20,6 +20,7 @@
#include <paludis/qa/ebuild_count_check.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
#include <algorithm>
#include <paludis/util/tr1_functional.hh>
diff --git a/paludis/qa/ebuild_name_check.cc b/paludis/qa/ebuild_name_check.cc
index d61f61c49..3deec6e3d 100644
--- a/paludis/qa/ebuild_name_check.cc
+++ b/paludis/qa/ebuild_name_check.cc
@@ -20,6 +20,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/qa/ebuild_name_check.hh>
using namespace paludis;
diff --git a/paludis/qa/file_check.cc b/paludis/qa/file_check.cc
index 4308a43d8..ae72835f4 100644
--- a/paludis/qa/file_check.cc
+++ b/paludis/qa/file_check.cc
@@ -33,7 +33,7 @@
#include <paludis/qa/root_check.hh>
#include <paludis/qa/variable_assigns_check.hh>
#include <paludis/qa/whitespace_check.hh>
-
+#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/virtual_constructor-impl.hh>
using namespace paludis;
@@ -42,6 +42,8 @@ using namespace paludis::qa;
template class VirtualConstructor<std::string, tr1::shared_ptr<FileCheck> (*) (),
virtual_constructor_not_found::ThrowException<NoSuchFileCheckTypeError> >;
+template class InstantiationPolicy<FileCheckMaker, instantiation_method::SingletonTag>;
+
FileCheck::FileCheck()
{
}
diff --git a/paludis/qa/files_dir_size_check.cc b/paludis/qa/files_dir_size_check.cc
index bcc03e681..6f6ca2105 100644
--- a/paludis/qa/files_dir_size_check.cc
+++ b/paludis/qa/files_dir_size_check.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -21,6 +21,7 @@
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/dir_iterator.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/function_check.cc b/paludis/qa/function_check.cc
index 64226654e..a4066c8c5 100644
--- a/paludis/qa/function_check.cc
+++ b/paludis/qa/function_check.cc
@@ -19,6 +19,7 @@
#include <fstream>
#include <paludis/qa/function_check.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <pcre++.h>
diff --git a/paludis/qa/glep_31_check.cc b/paludis/qa/glep_31_check.cc
index 01c95cac9..9ab262f78 100644
--- a/paludis/qa/glep_31_check.cc
+++ b/paludis/qa/glep_31_check.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -19,6 +19,7 @@
#include <fstream>
#include <paludis/qa/glep_31_check.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/gpg_check.cc b/paludis/qa/gpg_check.cc
index 5b7c07da9..7e19ffab0 100644
--- a/paludis/qa/gpg_check.cc
+++ b/paludis/qa/gpg_check.cc
@@ -20,6 +20,7 @@
#include <paludis/qa/gpg_check.hh>
#include <paludis/util/system.hh>
#include <paludis/util/fd_holder.hh>
+#include <paludis/util/stringify.hh>
#include <fstream>
#include <sys/types.h>
diff --git a/paludis/qa/header_check.cc b/paludis/qa/header_check.cc
index d47ec49a8..b5f535a7a 100644
--- a/paludis/qa/header_check.cc
+++ b/paludis/qa/header_check.cc
@@ -21,6 +21,7 @@
#include <sstream>
#include <paludis/qa/header_check.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
using namespace paludis;
diff --git a/paludis/qa/message.cc b/paludis/qa/message.cc
index 036fb4ca6..1d8b4bfe2 100644
--- a/paludis/qa/message.cc
+++ b/paludis/qa/message.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -19,6 +19,7 @@
#include <paludis/qa/message.hh>
#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
#include <ostream>
using namespace paludis;
diff --git a/paludis/qa/metadata_check.cc b/paludis/qa/metadata_check.cc
index fe55c1116..cbedd5e6d 100644
--- a/paludis/qa/metadata_check.cc
+++ b/paludis/qa/metadata_check.cc
@@ -23,6 +23,7 @@
#include <paludis/util/pstream.hh>
#include <paludis/util/system.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/stringify.hh>
#include <libxml/tree.h>
#include <libxml/parser.h>
diff --git a/paludis/qa/metadata_file.cc b/paludis/qa/metadata_file.cc
index b8db0e7ba..2b7a240b4 100644
--- a/paludis/qa/metadata_file.cc
+++ b/paludis/qa/metadata_file.cc
@@ -21,6 +21,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
#include <paludis/util/save.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/join.hh>
#include <paludis/util/tokeniser.hh>
#include <libxml/tree.h>
diff --git a/paludis/qa/package_dir_check.cc b/paludis/qa/package_dir_check.cc
index d84eb6769..75727e468 100644
--- a/paludis/qa/package_dir_check.cc
+++ b/paludis/qa/package_dir_check.cc
@@ -25,7 +25,7 @@
#include <paludis/qa/has_ebuilds_check.hh>
#include <paludis/qa/has_misc_files_check.hh>
#include <paludis/qa/package_name_check.hh>
-
+#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/virtual_constructor-impl.hh>
using namespace paludis;
@@ -34,6 +34,8 @@ using namespace paludis::qa;
template class VirtualConstructor<std::string, tr1::shared_ptr<PackageDirCheck> (*) (),
virtual_constructor_not_found::ThrowException<NoSuchPackageDirCheckTypeError> >;
+template class InstantiationPolicy<PackageDirCheckMaker, instantiation_method::SingletonTag>;
+
PackageDirCheck::PackageDirCheck()
{
}
diff --git a/paludis/qa/per_profile_ebuild_check.cc b/paludis/qa/per_profile_ebuild_check.cc
index c78e0ad66..0836fe92c 100644
--- a/paludis/qa/per_profile_ebuild_check.cc
+++ b/paludis/qa/per_profile_ebuild_check.cc
@@ -20,6 +20,7 @@
#include "per_profile_ebuild_check.hh"
#include <paludis/qa/deps_visible_check.hh>
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
using namespace paludis::qa;
@@ -27,6 +28,8 @@ using namespace paludis::qa;
template class VirtualConstructor<std::string, tr1::shared_ptr<PerProfileEbuildCheck> (*) (),
virtual_constructor_not_found::ThrowException<NoSuchPerProfileEbuildCheckTypeError> >;
+template class InstantiationPolicy<PerProfileEbuildCheckMaker, instantiation_method::SingletonTag>;
+
#include <paludis/qa/per_profile_ebuild_check-sr.cc>
PerProfileEbuildCheck::PerProfileEbuildCheck()
diff --git a/paludis/qa/profile_check.cc b/paludis/qa/profile_check.cc
index 0e5e7b7de..c20c942be 100644
--- a/paludis/qa/profile_check.cc
+++ b/paludis/qa/profile_check.cc
@@ -21,6 +21,7 @@
#include <paludis/qa/profile_check.hh>
#include <paludis/qa/profile_paths_exist_check.hh>
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
using namespace paludis::qa;
@@ -28,6 +29,8 @@ using namespace paludis::qa;
template class VirtualConstructor<std::string, tr1::shared_ptr<ProfileCheck> (*) (),
virtual_constructor_not_found::ThrowException<NoSuchProfileCheckTypeError> >;
+template class InstantiationPolicy<ProfileCheckMaker, instantiation_method::SingletonTag>;
+
#include <paludis/qa/profile_check-sr.cc>
ProfileCheck::ProfileCheck()
diff --git a/paludis/qa/profiles_check.cc b/paludis/qa/profiles_check.cc
index 363b96ab3..cf0b73a0f 100644
--- a/paludis/qa/profiles_check.cc
+++ b/paludis/qa/profiles_check.cc
@@ -21,6 +21,7 @@
#include <paludis/qa/categories_check.hh>
#include <paludis/qa/repo_name_check.hh>
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
using namespace paludis::qa;
@@ -28,6 +29,8 @@ using namespace paludis::qa;
template class VirtualConstructor<std::string, tr1::shared_ptr<ProfilesCheck> (*) (),
virtual_constructor_not_found::ThrowException<NoSuchProfilesCheckTypeError> >;
+template class InstantiationPolicy<ProfilesCheckMaker, instantiation_method::SingletonTag>;
+
ProfilesCheck::ProfilesCheck()
{
}
diff --git a/paludis/qa/root_check.cc b/paludis/qa/root_check.cc
index 92074c4c5..273f8de99 100644
--- a/paludis/qa/root_check.cc
+++ b/paludis/qa/root_check.cc
@@ -21,6 +21,7 @@
#include <paludis/qa/root_check.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
using namespace paludis;
diff --git a/paludis/qa/subshell_die_check.cc b/paludis/qa/subshell_die_check.cc
index 6da2e4e14..41998ad20 100644
--- a/paludis/qa/subshell_die_check.cc
+++ b/paludis/qa/subshell_die_check.cc
@@ -20,6 +20,7 @@
#include <fstream>
#include <paludis/qa/subshell_die_check.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
using namespace paludis;
diff --git a/paludis/qa/variable_assigns_check.cc b/paludis/qa/variable_assigns_check.cc
index f8a342d49..abd13dc6f 100644
--- a/paludis/qa/variable_assigns_check.cc
+++ b/paludis/qa/variable_assigns_check.cc
@@ -20,6 +20,7 @@
#include <fstream>
#include <paludis/qa/variable_assigns_check.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
#include <pcre++.h>
using namespace paludis;
diff --git a/paludis/qa/whitespace_check.cc b/paludis/qa/whitespace_check.cc
index bd594a7c2..a887daa56 100644
--- a/paludis/qa/whitespace_check.cc
+++ b/paludis/qa/whitespace_check.cc
@@ -20,6 +20,7 @@
#include <fstream>
#include <paludis/qa/whitespace_check.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/repositories/cran/cran_dep_parser.cc b/paludis/repositories/cran/cran_dep_parser.cc
index 48149f101..737ba8883 100644
--- a/paludis/repositories/cran/cran_dep_parser.cc
+++ b/paludis/repositories/cran/cran_dep_parser.cc
@@ -23,6 +23,7 @@
#include <paludis/repositories/cran/cran_description.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
#include <string>
diff --git a/paludis/repositories/cran/cran_description.cc b/paludis/repositories/cran/cran_description.cc
index 5e86faf99..1bbebd449 100644
--- a/paludis/repositories/cran/cran_description.cc
+++ b/paludis/repositories/cran/cran_description.cc
@@ -25,6 +25,7 @@
#include <paludis/eapi.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/stringify.hh>
#include <string>
#include <algorithm>
#include <paludis/util/tr1_functional.hh>
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index a3e5cd752..7dce7015e 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -22,6 +22,7 @@
#include <paludis/match_package.hh>
#include <paludis/package_database.hh>
#include <paludis/environment.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/eapi.hh>
#include <paludis/repositories/cran/cran_description.hh>
#include <paludis/repositories/cran/cran_dep_parser.hh>
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index f72bda0c3..6a987ba64 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -38,6 +38,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/pstream.hh>
#include <paludis/util/random.hh>
#include <paludis/util/save.hh>
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index e9a42a6f7..11551fd02 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -19,6 +19,7 @@
#include "fake_repository.hh"
#include <paludis/util/collection_concrete.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/distribution.hh>
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index c49af55d4..0c47dae4c 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -21,6 +21,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/version_metadata.hh>
#include <paludis/portage_dep_parser.hh>
diff --git a/paludis/repositories/gentoo/eapi_phase.cc b/paludis/repositories/gentoo/eapi_phase.cc
index 158e1f63f..b79eda8bf 100644
--- a/paludis/repositories/gentoo/eapi_phase.cc
+++ b/paludis/repositories/gentoo/eapi_phase.cc
@@ -19,6 +19,7 @@
#include "eapi_phase.hh"
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/eapi.hh>
diff --git a/paludis/repositories/gentoo/ebin_entries.cc b/paludis/repositories/gentoo/ebin_entries.cc
index eb78be25c..0cd09a1c0 100644
--- a/paludis/repositories/gentoo/ebin_entries.cc
+++ b/paludis/repositories/gentoo/ebin_entries.cc
@@ -29,6 +29,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/system.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/dep_spec_pretty_printer.hh>
diff --git a/paludis/repositories/gentoo/ebuild_entries.cc b/paludis/repositories/gentoo/ebuild_entries.cc
index 4889b88f7..ec622db9e 100644
--- a/paludis/repositories/gentoo/ebuild_entries.cc
+++ b/paludis/repositories/gentoo/ebuild_entries.cc
@@ -35,6 +35,7 @@
#include <paludis/util/strip.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/tr1_functional.hh>
diff --git a/paludis/repositories/gentoo/eclass_mtimes.cc b/paludis/repositories/gentoo/eclass_mtimes.cc
index 50e12ed2f..ade07e417 100644
--- a/paludis/repositories/gentoo/eclass_mtimes.cc
+++ b/paludis/repositories/gentoo/eclass_mtimes.cc
@@ -19,6 +19,7 @@
#include "eclass_mtimes.hh"
#include <paludis/hashed_containers.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
using namespace paludis;
diff --git a/paludis/repositories/gentoo/glsa.cc b/paludis/repositories/gentoo/glsa.cc
index 7727065ce..371862fa6 100644
--- a/paludis/repositories/gentoo/glsa.cc
+++ b/paludis/repositories/gentoo/glsa.cc
@@ -20,6 +20,7 @@
#include "glsa.hh"
#include <paludis/util/iterator.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
#include <dlfcn.h>
#include <stdint.h>
diff --git a/paludis/repositories/gentoo/layout.cc b/paludis/repositories/gentoo/layout.cc
index 4fa33b629..ecfbe129b 100644
--- a/paludis/repositories/gentoo/layout.cc
+++ b/paludis/repositories/gentoo/layout.cc
@@ -23,6 +23,7 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
@@ -31,6 +32,8 @@ template class VirtualConstructor<std::string,
tr1::shared_ptr<const PortageRepositoryEntries>),
virtual_constructor_not_found::ThrowException<NoSuchLayoutType> >;
+template class InstantiationPolicy<LayoutMaker, instantiation_method::SingletonTag>;
+
Layout::Layout() :
_profiles_dirs(new FSEntryCollection::Concrete)
{
diff --git a/paludis/repositories/gentoo/portage_repository.cc b/paludis/repositories/gentoo/portage_repository.cc
index 3d9c93e92..18b7ceb79 100644
--- a/paludis/repositories/gentoo/portage_repository.cc
+++ b/paludis/repositories/gentoo/portage_repository.cc
@@ -35,6 +35,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_flattener.hh>
#include <paludis/environment.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/hashed_containers.hh>
#include <paludis/hook.hh>
#include <paludis/match_package.hh>
diff --git a/paludis/repositories/gentoo/portage_repository_entries.cc b/paludis/repositories/gentoo/portage_repository_entries.cc
index eaa083b5a..708d69f38 100644
--- a/paludis/repositories/gentoo/portage_repository_entries.cc
+++ b/paludis/repositories/gentoo/portage_repository_entries.cc
@@ -21,6 +21,7 @@
#include "ebuild_entries.hh"
#include "ebin_entries.hh"
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
@@ -29,6 +30,8 @@ template class VirtualConstructor<std::string,
const PortageRepositoryParams &),
virtual_constructor_not_found::ThrowException<NoSuchPortageRepositoryEntriesType> >;
+template class InstantiationPolicy<PortageRepositoryEntriesMaker, instantiation_method::SingletonTag>;
+
PortageRepositoryEntries::~PortageRepositoryEntries()
{
}
diff --git a/paludis/repositories/gentoo/portage_repository_news.cc b/paludis/repositories/gentoo/portage_repository_news.cc
index 45a77bd5c..89b2efb30 100644
--- a/paludis/repositories/gentoo/portage_repository_news.cc
+++ b/paludis/repositories/gentoo/portage_repository_news.cc
@@ -26,6 +26,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/query.hh>
#include <set>
diff --git a/paludis/repositories/gentoo/portage_repository_profile.cc b/paludis/repositories/gentoo/portage_repository_profile.cc
index dcc34917c..6e6f2c41b 100644
--- a/paludis/repositories/gentoo/portage_repository_profile.cc
+++ b/paludis/repositories/gentoo/portage_repository_profile.cc
@@ -23,6 +23,7 @@
#include <paludis/repositories/gentoo/portage_repository.hh>
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/save.hh>
#include <paludis/util/system.hh>
diff --git a/paludis/repositories/gentoo/portage_repository_profile_file.cc b/paludis/repositories/gentoo/portage_repository_profile_file.cc
index 9ed191087..143d0f104 100644
--- a/paludis/repositories/gentoo/portage_repository_profile_file.cc
+++ b/paludis/repositories/gentoo/portage_repository_profile_file.cc
@@ -19,7 +19,9 @@
#include "portage_repository_profile_file.hh"
#include <paludis/util/log.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/config_file.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
#include <algorithm>
diff --git a/paludis/repositories/gentoo/portage_repository_sets.cc b/paludis/repositories/gentoo/portage_repository_sets.cc
index 1d29be701..5247c1244 100644
--- a/paludis/repositories/gentoo/portage_repository_sets.cc
+++ b/paludis/repositories/gentoo/portage_repository_sets.cc
@@ -36,6 +36,7 @@
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tokeniser.hh>
#include <list>
diff --git a/paludis/repositories/gentoo/traditional_layout.cc b/paludis/repositories/gentoo/traditional_layout.cc
index c1c6f37d0..a68a73852 100644
--- a/paludis/repositories/gentoo/traditional_layout.cc
+++ b/paludis/repositories/gentoo/traditional_layout.cc
@@ -24,8 +24,10 @@
#include <paludis/hashed_containers.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/log.hh>
#include <paludis/util/collection_concrete.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/strip.hh>
diff --git a/paludis/repositories/gentoo/use_desc.cc b/paludis/repositories/gentoo/use_desc.cc
index 7d5ced8ba..cb4c8add3 100644
--- a/paludis/repositories/gentoo/use_desc.cc
+++ b/paludis/repositories/gentoo/use_desc.cc
@@ -23,6 +23,8 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/strip.hh>
#include <paludis/config_file.hh>
#include <paludis/package_database_entry.hh>
diff --git a/paludis/repositories/gentoo/vdb_merger.cc b/paludis/repositories/gentoo/vdb_merger.cc
index 85fc79305..57e3adb8b 100644
--- a/paludis/repositories/gentoo/vdb_merger.cc
+++ b/paludis/repositories/gentoo/vdb_merger.cc
@@ -22,6 +22,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/system.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/hook.hh>
#include <paludis/digests/md5.hh>
#include <paludis/environment.hh>
diff --git a/paludis/repositories/gentoo/vdb_repository.cc b/paludis/repositories/gentoo/vdb_repository.cc
index a0cd62186..5ff918070 100644
--- a/paludis/repositories/gentoo/vdb_repository.cc
+++ b/paludis/repositories/gentoo/vdb_repository.cc
@@ -25,6 +25,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_flattener.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/dep_tag.hh>
#include <paludis/eapi.hh>
#include <paludis/dep_spec_pretty_printer.hh>
diff --git a/paludis/repositories/gentoo/vdb_unmerger.cc b/paludis/repositories/gentoo/vdb_unmerger.cc
index 4fe7606a6..daab19e61 100644
--- a/paludis/repositories/gentoo/vdb_unmerger.cc
+++ b/paludis/repositories/gentoo/vdb_unmerger.cc
@@ -29,6 +29,7 @@ using namespace paludis;
#include <paludis/util/dir_iterator.hh>
#include <paludis/digests/md5.hh>
#include <paludis/hook.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/package_database.hh>
#include <paludis/util/join.hh>
#include <list>
diff --git a/paludis/repositories/repository_maker.cc b/paludis/repositories/repository_maker.cc
index 3829b633f..602547728 100644
--- a/paludis/repositories/repository_maker.cc
+++ b/paludis/repositories/repository_maker.cc
@@ -20,6 +20,8 @@
#include "repository_maker.hh"
#include <paludis/util/fs_entry.hh>
#include <paludis/util/dir_iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/system.hh>
#include <paludis/util/virtual_constructor-impl.hh>
@@ -44,6 +46,8 @@ template class VirtualConstructor<std::string,
tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >),
virtual_constructor_not_found::ThrowException<NoSuchRepositoryTypeError> >;
+template class InstantiationPolicy<RepositoryMaker, instantiation_method::SingletonTag>;
+
NoSuchRepositoryTypeError::NoSuchRepositoryTypeError(const std::string & format) throw ():
ConfigurationError("No available maker for repository type '" + format + "'")
{
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index dd16d7fa7..351ee67dd 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -20,6 +20,7 @@
#include <paludis/repositories/virtuals/installed_virtuals_repository.hh>
#include <paludis/repositories/virtuals/vr_entry.hh>
#include <paludis/util/fast_unique_copy.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 8a2fd65e6..25aaad5df 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -23,6 +23,7 @@
#include <paludis/match_package.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fast_unique_copy.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/log.hh>
#include <paludis/query.hh>
#include <vector>
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 6a3643f5a..bbb1f3a21 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -21,6 +21,9 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/config_file.hh>
#include <map>
#include <list>
diff --git a/paludis/repository_name_cache.cc b/paludis/repository_name_cache.cc
index 221455c65..4732b47e2 100644
--- a/paludis/repository_name_cache.cc
+++ b/paludis/repository_name_cache.cc
@@ -23,7 +23,9 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/dir_iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
#include <fstream>
diff --git a/paludis/selinux/security_context.cc b/paludis/selinux/security_context.cc
index 41057765f..2d514d3c7 100644
--- a/paludis/selinux/security_context.cc
+++ b/paludis/selinux/security_context.cc
@@ -19,11 +19,12 @@
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/selinux/security_context.hh>
#include "config.h"
-
#include <dlfcn.h>
// I think the name explains it. C++ is picky about casting to function pointers.
@@ -127,6 +128,8 @@ namespace
using namespace paludis;
+template class InstantiationPolicy<MatchPathCon, instantiation_method::SingletonTag>;
+
namespace paludis
{
template<>
diff --git a/paludis/set_file.cc b/paludis/set_file.cc
index 48ebfce3b..2ac9a6e53 100644
--- a/paludis/set_file.cc
+++ b/paludis/set_file.cc
@@ -22,6 +22,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/pstream.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/config_file.hh>
#include <paludis/environment.hh>
#include <paludis/query.hh>
diff --git a/paludis/sohooks_TEST.cc b/paludis/sohooks_TEST.cc
index ec00e3b73..d4e57e3f3 100644
--- a/paludis/sohooks_TEST.cc
+++ b/paludis/sohooks_TEST.cc
@@ -21,6 +21,7 @@
#include <paludis/hook.hh>
#include <paludis/util/graph.hh>
#include <paludis/util/graph-impl.hh>
+#include <paludis/util/stringify.hh>
#include <iostream>
#include <fstream>
diff --git a/paludis/tasks/install_task.cc b/paludis/tasks/install_task.cc
index 3a4232f41..1a09e5747 100644
--- a/paludis/tasks/install_task.cc
+++ b/paludis/tasks/install_task.cc
@@ -24,6 +24,7 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/iterator.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/query.hh>
#include <paludis/hook.hh>
#include <paludis/repository.hh>
diff --git a/paludis/tasks/report_task.cc b/paludis/tasks/report_task.cc
index 21b3a7ce4..df53f2ac9 100644
--- a/paludis/tasks/report_task.cc
+++ b/paludis/tasks/report_task.cc
@@ -22,6 +22,7 @@
#include <paludis/dep_list/uninstall_list.hh>
#include <paludis/environment.hh>
#include <paludis/query.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/package_database.hh>
#include <set>
diff --git a/paludis/tasks/stage_builder_task.cc b/paludis/tasks/stage_builder_task.cc
index fd44296a8..49782fa4f 100644
--- a/paludis/tasks/stage_builder_task.cc
+++ b/paludis/tasks/stage_builder_task.cc
@@ -20,6 +20,7 @@
#include "stage_builder_task.hh"
#include <paludis/environment.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <list>
using namespace paludis;
diff --git a/paludis/tasks/sync_task.cc b/paludis/tasks/sync_task.cc
index 773ff1d54..9ba51a7cc 100644
--- a/paludis/tasks/sync_task.cc
+++ b/paludis/tasks/sync_task.cc
@@ -20,6 +20,7 @@
#include "sync_task.hh"
#include <paludis/environment.hh>
#include <paludis/syncer.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/package_database.hh>
#include <paludis/hook.hh>
#include <list>
diff --git a/paludis/tasks/uninstall_task.cc b/paludis/tasks/uninstall_task.cc
index 6c76f49a9..98b34537d 100644
--- a/paludis/tasks/uninstall_task.cc
+++ b/paludis/tasks/uninstall_task.cc
@@ -24,6 +24,7 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/tasks/exceptions.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/query.hh>
#include <paludis/hook.hh>
#include <list>
diff --git a/paludis/util/destringify.cc b/paludis/util/destringify.cc
index 652d10ab6..35364c0f5 100644
--- a/paludis/util/destringify.cc
+++ b/paludis/util/destringify.cc
@@ -17,7 +17,6 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#include <paludis/util/destringify.hh>
/** \file
diff --git a/paludis/util/destringify_TEST.cc b/paludis/util/destringify_TEST.cc
index 8f01173a8..d9aa4216e 100644
--- a/paludis/util/destringify_TEST.cc
+++ b/paludis/util/destringify_TEST.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/util/destringify.hh>
+#include <paludis/util/stringify.hh>
#include <string>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
diff --git a/paludis/util/dir_iterator.cc b/paludis/util/dir_iterator.cc
index f9f4b1e7d..7e6419d63 100644
--- a/paludis/util/dir_iterator.cc
+++ b/paludis/util/dir_iterator.cc
@@ -21,6 +21,7 @@
#include <errno.h>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <sys/types.h>
#include <set>
diff --git a/paludis/util/exception.cc b/paludis/util/exception.cc
index 2976fdf80..2ef57b52f 100644
--- a/paludis/util/exception.cc
+++ b/paludis/util/exception.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
#include <libebt/libebt.hh>
#include "config.h"
diff --git a/paludis/util/exception.hh b/paludis/util/exception.hh
index ebd41089c..c7eb1cbd5 100644
--- a/paludis/util/exception.hh
+++ b/paludis/util/exception.hh
@@ -21,8 +21,6 @@
#define PALUDIS_GUARD_PALUDIS_EXCEPTION_HH 1
#include <paludis/util/attributes.hh>
-#include <paludis/util/stringify.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <string>
#include <exception>
@@ -219,10 +217,6 @@ namespace paludis
ConfigurationError(const std::string & msg) throw ();
};
- template <typename T_>
- std::string
- stringify(const T_ & item);
-
/** \def PALUDIS_HERE
* Expands to the current function name, file and line, for use with
* paludis::InternalError.
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index c9f554dd7..5f41759eb 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -21,7 +21,7 @@ add(`fs_entry', `hh', `cc', `fwd', `test', `testscript'
add(`fd_holder', `hh')
add(`graph', `hh', `cc', `impl', `test')
add(`iterator', `hh', `test')
-add(`instantiation_policy', `hh', `test')
+add(`instantiation_policy', `hh', `impl', `test')
add(`is_file_with_extension', `hh', `cc', `se', `test', `testscript')
add(`join', `hh', `test')
add(`log', `hh', `cc', `se', `test')
@@ -30,7 +30,7 @@ add(`operators', `hh')
add(`options', `hh', `cc', `test')
add(`output_wrapper', `test', `testscript')
add(`pipe', `hh', `cc')
-add(`private_implementation_pattern', `hh')
+add(`private_implementation_pattern', `hh', `impl')
add(`pstream', `hh', `cc', `test')
add(`random', `hh', `cc', `test')
add(`save', `hh', `test')
diff --git a/paludis/util/graph-impl.hh b/paludis/util/graph-impl.hh
index b27c3568e..8310b4b62 100644
--- a/paludis/util/graph-impl.hh
+++ b/paludis/util/graph-impl.hh
@@ -21,6 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_UTIL_GRAPH_IMPL_HH 1
#include <paludis/util/graph.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <map>
#include <set>
diff --git a/paludis/util/graph.hh b/paludis/util/graph.hh
index 5d242edc2..aab2fc9be 100644
--- a/paludis/util/graph.hh
+++ b/paludis/util/graph.hh
@@ -23,6 +23,7 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/exception.hh>
+#include <paludis/util/tr1_memory.hh>
/** \file
* Declarations for DirectedGraph and related utilities.
diff --git a/paludis/util/instantiation_policy-impl.hh b/paludis/util/instantiation_policy-impl.hh
new file mode 100644
index 000000000..9cf808da4
--- /dev/null
+++ b/paludis/util/instantiation_policy-impl.hh
@@ -0,0 +1,92 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * 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_UTIL_INSTANTIATION_POLICY_IMPL_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_INSTANTIATION_POLICY_IMPL_HH 1
+
+#include <paludis/util/instantiation_policy.hh>
+#include <paludis/util/exception.hh>
+#include <paludis/util/save.hh>
+#include <paludis/util/stringify.hh>
+
+template <typename OurType_>
+void
+paludis::InstantiationPolicy<OurType_, paludis::instantiation_method::SingletonTag>::_delete(OurType_ * const p)
+{
+ delete p;
+}
+
+template <typename OurType_>
+class paludis::InstantiationPolicy<OurType_, paludis::instantiation_method::SingletonTag>::DeleteOnDestruction
+{
+ private:
+ OurType_ * * const _ptr;
+
+ public:
+ DeleteOnDestruction(OurType_ * * const p) :
+ _ptr(p)
+ {
+ }
+
+ ~DeleteOnDestruction()
+ {
+ paludis::InstantiationPolicy<OurType_, paludis::instantiation_method::SingletonTag>::_delete(* _ptr);
+ * _ptr = 0;
+ }
+};
+
+template<typename OurType_>
+OurType_ * *
+paludis::InstantiationPolicy<OurType_, paludis::instantiation_method::SingletonTag>::_get_instance_ptr()
+{
+ static OurType_ * instance(0);
+ static DeleteOnDestruction delete_instance(&instance);
+
+ return &instance;
+}
+
+template<typename OurType_>
+OurType_ *
+paludis::InstantiationPolicy<OurType_, paludis::instantiation_method::SingletonTag>::get_instance()
+{
+ static bool recursive(false);
+ OurType_ * * i(_get_instance_ptr());
+
+ if (0 == *i)
+ {
+ if (recursive)
+ throw paludis::InternalError(PALUDIS_HERE, "Recursive instantiation");
+
+ Save<bool> save_recursive(&recursive, true);
+ *i = new OurType_;
+ }
+
+ return *i;
+}
+
+template<typename OurType_>
+void
+paludis::InstantiationPolicy<OurType_, paludis::instantiation_method::SingletonTag>::destroy_instance()
+{
+ OurType_ * * i(_get_instance_ptr());
+ delete *i;
+ *i = 0;
+}
+
+#endif
diff --git a/paludis/util/instantiation_policy.hh b/paludis/util/instantiation_policy.hh
index c9cdf0bdb..f4029323a 100644
--- a/paludis/util/instantiation_policy.hh
+++ b/paludis/util/instantiation_policy.hh
@@ -21,8 +21,6 @@
#define PALUDIS_GUARD_PALUDIS_INSTANTIATION_POLICY_HH 1
#include <paludis/util/attributes.hh>
-#include <paludis/util/exception.hh>
-#include <paludis/util/save.hh>
/** \file
* InstantiationPolicy patterns.
@@ -44,27 +42,21 @@ namespace paludis
*
* \ingroup grpinstance
*/
- struct NonCopyableTag
- {
- };
+ struct NonCopyableTag;
/**
* Cannot be instantiated
*
* \ingroup grpinstance
*/
- struct NonInstantiableTag
- {
- };
+ struct NonInstantiableTag;
/**
* Single instance.
*
* \ingroup grpinstance
*/
- struct SingletonTag
- {
- };
+ struct SingletonTag;
}
/**
@@ -88,22 +80,12 @@ namespace paludis
{
private:
InstantiationPolicy(const InstantiationPolicy &);
-
const InstantiationPolicy & operator= (const InstantiationPolicy &);
- protected:
- ///\name Basic operations
- ///\{
-
- ~InstantiationPolicy()
- {
- }
-
+ public:
InstantiationPolicy()
{
}
-
- ///\}
};
/**
@@ -117,20 +99,8 @@ namespace paludis
{
private:
InstantiationPolicy(const InstantiationPolicy &);
-
const InstantiationPolicy & operator= (const InstantiationPolicy &);
-
- protected:
- ///\name Basic operations
- ///\{
-
InstantiationPolicy();
-
- ~InstantiationPolicy()
- {
- }
-
- ///\}
};
/**
@@ -153,28 +123,9 @@ namespace paludis
class DeleteOnDestruction;
friend class DeleteOnDestruction;
- static void _delete(OurType_ * const p)
- {
- delete p;
- }
+ static void _delete(OurType_ * const p);
- class PALUDIS_VISIBLE DeleteOnDestruction
- {
- private:
- OurType_ * * const _ptr;
-
- public:
- DeleteOnDestruction(OurType_ * * const p) :
- _ptr(p)
- {
- }
-
- ~DeleteOnDestruction()
- {
- InstantiationPolicy<OurType_, instantiation_method::SingletonTag>::_delete(* _ptr);
- * _ptr = 0;
- }
- };
+ class DeleteOnDestruction;
protected:
///\name Basic operations
@@ -203,44 +154,6 @@ namespace paludis
///\}
};
-
- template<typename OurType_>
- OurType_ * *
- InstantiationPolicy<OurType_, instantiation_method::SingletonTag>::_get_instance_ptr()
- {
- static OurType_ * instance(0);
- static DeleteOnDestruction delete_instance(&instance);
-
- return &instance;
- }
-
- template<typename OurType_>
- OurType_ *
- InstantiationPolicy<OurType_, instantiation_method::SingletonTag>::get_instance()
- {
- static bool recursive(false);
- OurType_ * * i(_get_instance_ptr());
-
- if (0 == *i)
- {
- if (recursive)
- throw InternalError(PALUDIS_HERE, "Recursive instantiation");
-
- Save<bool> save_recursive(&recursive, true);
- *i = new OurType_;
- }
-
- return *i;
- }
-
- template<typename OurType_>
- void
- InstantiationPolicy<OurType_, instantiation_method::SingletonTag>::destroy_instance()
- {
- OurType_ * * i(_get_instance_ptr());
- delete *i;
- *i = 0;
- }
}
#endif
diff --git a/paludis/util/instantiation_policy_TEST.cc b/paludis/util/instantiation_policy_TEST.cc
index 0a228815b..a74e67c38 100644
--- a/paludis/util/instantiation_policy_TEST.cc
+++ b/paludis/util/instantiation_policy_TEST.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/util/instantiation_policy.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <string>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
diff --git a/paludis/util/is_file_with_extension.cc b/paludis/util/is_file_with_extension.cc
index 784a592e4..d581a1bce 100644
--- a/paludis/util/is_file_with_extension.cc
+++ b/paludis/util/is_file_with_extension.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/stringify.hh>
+#include <ostream>
using namespace paludis;
diff --git a/paludis/util/log.cc b/paludis/util/log.cc
index 7d427764c..d0d7119a3 100644
--- a/paludis/util/log.cc
+++ b/paludis/util/log.cc
@@ -20,6 +20,9 @@
#include <iostream>
#include <exception>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/exception.hh>
/** \file
* Implementation for Log.
@@ -31,6 +34,8 @@ using namespace paludis;
#include <paludis/util/log-se.cc>
+template class InstantiationPolicy<Log, instantiation_method::SingletonTag>;
+
namespace paludis
{
/**
diff --git a/paludis/util/log.hh b/paludis/util/log.hh
index 9626dc4fb..fdf3c61c2 100644
--- a/paludis/util/log.hh
+++ b/paludis/util/log.hh
@@ -21,6 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_LOG_HH 1
#include <iosfwd>
+#include <string>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/private_implementation_pattern.hh>
diff --git a/paludis/util/options.cc b/paludis/util/options.cc
index 56fbd7bef..51e6501fb 100644
--- a/paludis/util/options.cc
+++ b/paludis/util/options.cc
@@ -18,6 +18,7 @@
*/
#include "options.hh"
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <vector>
#include <algorithm>
#include <functional>
diff --git a/paludis/util/pipe.cc b/paludis/util/pipe.cc
index 7cb714e97..803733e4b 100644
--- a/paludis/util/pipe.cc
+++ b/paludis/util/pipe.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -19,6 +19,7 @@
#include "pipe.hh"
#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
#include <unistd.h>
using namespace paludis;
diff --git a/paludis/util/private_implementation_pattern-impl.hh b/paludis/util/private_implementation_pattern-impl.hh
new file mode 100644
index 000000000..83a9967b8
--- /dev/null
+++ b/paludis/util/private_implementation_pattern-impl.hh
@@ -0,0 +1,70 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * 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_UTIL_PRIVATE_IMPLEMENTATION_PATTERN_IMPL_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_PRIVATE_IMPLEMENTATION_PATTERN_IMPL_HH 1
+
+#include <paludis/util/private_implementation_pattern.hh>
+
+template <typename C_>
+paludis::PrivateImplementationPattern<C_>::ImpPtr::ImpPtr(Implementation<C_> * p) :
+ _ptr(p)
+{
+}
+
+template <typename C_>
+paludis::PrivateImplementationPattern<C_>::ImpPtr::~ImpPtr()
+{
+ delete _ptr;
+}
+
+template <typename C_>
+paludis::Implementation<C_> *
+paludis::PrivateImplementationPattern<C_>::ImpPtr::operator-> ()
+{
+ return _ptr;
+}
+
+template <typename C_>
+const paludis::Implementation<C_> *
+paludis::PrivateImplementationPattern<C_>::ImpPtr::operator-> () const
+{
+ return _ptr;
+}
+
+template <typename C_>
+void
+paludis::PrivateImplementationPattern<C_>::ImpPtr::reset(Implementation<C_> * p)
+{
+ delete _ptr;
+ _ptr = p;
+}
+
+template <typename C_>
+paludis::PrivateImplementationPattern<C_>::PrivateImplementationPattern(Implementation<C_> * i) :
+ _imp(i)
+{
+}
+
+template <typename C_>
+paludis::PrivateImplementationPattern<C_>::~PrivateImplementationPattern()
+{
+}
+
+#endif
diff --git a/paludis/util/private_implementation_pattern.hh b/paludis/util/private_implementation_pattern.hh
index b7a8d3342..65b9bf6d9 100644
--- a/paludis/util/private_implementation_pattern.hh
+++ b/paludis/util/private_implementation_pattern.hh
@@ -67,41 +67,25 @@ namespace paludis
///\name Basic operations
///\{
- ImpPtr(Implementation<C_> * p) :
- _ptr(p)
- {
- }
+ ImpPtr(Implementation<C_> * p);
- ~ImpPtr()
- {
- delete _ptr;
- }
+ ~ImpPtr();
///\}
///\name Dereference operators
//\{
- Implementation<C_> * operator-> ()
- {
- return _ptr;
- }
+ Implementation<C_> * operator-> ();
- const Implementation<C_> * operator-> () const
- {
- return _ptr;
- }
+ const Implementation<C_> * operator-> () const;
///\}
/**
* Reset to a new Implementation.
*/
- void reset(Implementation<C_> * p)
- {
- std::swap(_ptr, p);
- delete p;
- }
+ void reset(Implementation<C_> * p);
};
/**
@@ -113,14 +97,9 @@ namespace paludis
/**
* Constructor.
*/
- explicit PrivateImplementationPattern(Implementation<C_> * i) :
- _imp(i)
- {
- }
+ explicit PrivateImplementationPattern(Implementation<C_> * i);
- ~PrivateImplementationPattern()
- {
- }
+ ~PrivateImplementationPattern();
};
}
diff --git a/paludis/util/pstream.cc b/paludis/util/pstream.cc
index a73af2deb..eb171aa5d 100644
--- a/paludis/util/pstream.cc
+++ b/paludis/util/pstream.cc
@@ -19,6 +19,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/pstream.hh>
+#include <paludis/util/stringify.hh>
#include <cstring>
#include <errno.h>
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index ded60d59a..167e44d51 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -23,6 +23,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/destringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/paludis/util/system.hh b/paludis/util/system.hh
index 42e98c1bd..39deace79 100644
--- a/paludis/util/system.hh
+++ b/paludis/util/system.hh
@@ -22,6 +22,8 @@
#include <paludis/util/exception.hh>
#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/tr1_memory.hh>
+#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <string>
#include <sys/types.h>
diff --git a/paludis/util/tokeniser.cc b/paludis/util/tokeniser.cc
index 982256d2f..88a00b6a7 100644
--- a/paludis/util/tokeniser.cc
+++ b/paludis/util/tokeniser.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -18,9 +18,12 @@
*/
#include "tokeniser.hh"
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
+template class InstantiationPolicy<WhitespaceTokeniser, instantiation_method::SingletonTag>;
+
WhitespaceTokeniser::WhitespaceTokeniser() :
Tokeniser<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(" \t\r\n")
{
diff --git a/paludis/util/virtual_constructor_TEST.cc b/paludis/util/virtual_constructor_TEST.cc
index 5d59af370..8bcc91887 100644
--- a/paludis/util/virtual_constructor_TEST.cc
+++ b/paludis/util/virtual_constructor_TEST.cc
@@ -19,6 +19,7 @@
#include <paludis/util/virtual_constructor.hh>
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <set>
diff --git a/paludis/version_metadata.cc b/paludis/version_metadata.cc
index bdff34c86..78a613b22 100644
--- a/paludis/version_metadata.cc
+++ b/paludis/version_metadata.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/util/iterator.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/version_metadata.hh>
#include <paludis/portage_dep_parser.hh>
diff --git a/paludis/version_operator.hh b/paludis/version_operator.hh
index 5c8c78c73..9a779a4ff 100644
--- a/paludis/version_operator.hh
+++ b/paludis/version_operator.hh
@@ -22,6 +22,7 @@
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/operators.hh>
+#include <paludis/util/exception.hh>
#include <paludis/version_operator-fwd.hh>
#include <paludis/version_spec-fwd.hh>
#include <string>
diff --git a/paludis/version_requirements.cc b/paludis/version_requirements.cc
index 004e9aa26..df4943255 100644
--- a/paludis/version_requirements.cc
+++ b/paludis/version_requirements.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -18,6 +18,7 @@
*/
#include "version_requirements.hh"
+#include <paludis/util/stringify.hh>
using namespace paludis;
diff --git a/paludis/version_spec.cc b/paludis/version_spec.cc
index c7c669da7..b12e7f85b 100644
--- a/paludis/version_spec.cc
+++ b/paludis/version_spec.cc
@@ -24,6 +24,7 @@
#include <paludis/util/iterator.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/version_spec.hh>
#include <vector>
#include <limits>
diff --git a/python/exception.cc b/python/exception.cc
index c95b0d556..8c61c264c 100644
--- a/python/exception.cc
+++ b/python/exception.cc
@@ -18,13 +18,16 @@
*/
#include "exception.hh"
-
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <map>
using namespace paludis;
using namespace paludis::python;
namespace bp = boost::python;
+template class InstantiationPolicy<ExceptionRegister, instantiation_method::SingletonTag>;
+
RegisteredExceptionBase::~RegisteredExceptionBase()
{
}
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index 637f755ab..c86a24607 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -22,6 +22,8 @@
#include <paludis_ruby.hh>
#include <paludis/config_file.hh>
#include <paludis/dep_list/exceptions.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <ruby.h>
#include <list>
#include <ctype.h>
@@ -35,6 +37,8 @@ using namespace paludis::ruby;
#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
+template class InstantiationPolicy<RegisterRubyClass, instantiation_method::SingletonTag>;
+
namespace paludis
{
template<>
diff --git a/src/clients/adjutrix/command_line.cc b/src/clients/adjutrix/command_line.cc
index 6bd795d00..f712bf47b 100644
--- a/src/clients/adjutrix/command_line.cc
+++ b/src/clients/adjutrix/command_line.cc
@@ -19,6 +19,9 @@
#include "command_line.hh"
#include <paludis/name.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
+
+template class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
CommandLine::CommandLine() :
ArgsHandler(),
diff --git a/src/clients/contrarius/command_line.cc b/src/clients/contrarius/command_line.cc
index e4ea84d1d..013fdee1e 100644
--- a/src/clients/contrarius/command_line.cc
+++ b/src/clients/contrarius/command_line.cc
@@ -18,6 +18,9 @@
*/
#include "command_line.hh"
+#include <paludis/util/instantiation_policy-impl.hh>
+
+template class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
CommandLine::CommandLine() :
ArgsHandler(),
diff --git a/src/clients/contrarius/target_config.cc b/src/clients/contrarius/target_config.cc
index bc4fa24a4..5dd75bc5f 100644
--- a/src/clients/contrarius/target_config.cc
+++ b/src/clients/contrarius/target_config.cc
@@ -19,6 +19,8 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/config_file.hh>
#include <list>
#include <string>
@@ -29,6 +31,8 @@
using namespace paludis;
+template class InstantiationPolicy<TargetConfig, instantiation_method::SingletonTag>;
+
void
TargetConfig::_parse_defaults()
{
diff --git a/src/clients/inquisitio/command_line.cc b/src/clients/inquisitio/command_line.cc
index 44440c4aa..b99d974f4 100644
--- a/src/clients/inquisitio/command_line.cc
+++ b/src/clients/inquisitio/command_line.cc
@@ -19,9 +19,12 @@
#include "command_line.hh"
#include <paludis/name.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
+template class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
+
CommandLine::CommandLine() :
ArgsHandler(),
diff --git a/src/clients/inquisitio/description_extractor.cc b/src/clients/inquisitio/description_extractor.cc
index 7c3d919f7..ec4b26b75 100644
--- a/src/clients/inquisitio/description_extractor.cc
+++ b/src/clients/inquisitio/description_extractor.cc
@@ -19,6 +19,7 @@
#include "description_extractor.hh"
#include <paludis/package_database.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
using namespace paludis;
using namespace inquisitio;
diff --git a/src/clients/inquisitio/extractor.cc b/src/clients/inquisitio/extractor.cc
index 2762f9c69..deb25e8fa 100644
--- a/src/clients/inquisitio/extractor.cc
+++ b/src/clients/inquisitio/extractor.cc
@@ -21,6 +21,8 @@
#include "description_extractor.hh"
#include "name_extractor.hh"
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace inquisitio;
using namespace paludis;
@@ -29,6 +31,8 @@ template class paludis::VirtualConstructor<std::string,
tr1::shared_ptr<Extractor> (*) (const paludis::Environment &),
paludis::virtual_constructor_not_found::ThrowException<NoSuchExtractorError> >;
+template class paludis::InstantiationPolicy<ExtractorMaker, paludis::instantiation_method::SingletonTag>;
+
NoSuchExtractorError::NoSuchExtractorError(const std::string & m) throw () :
Exception("No such extractor '" + m + "'")
{
diff --git a/src/clients/inquisitio/matcher.cc b/src/clients/inquisitio/matcher.cc
index 2a24fca1b..a184f45fb 100644
--- a/src/clients/inquisitio/matcher.cc
+++ b/src/clients/inquisitio/matcher.cc
@@ -21,6 +21,8 @@
#include "pcre_matcher.hh"
#include "text_matcher.hh"
#include <paludis/util/virtual_constructor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace inquisitio;
using namespace paludis;
@@ -29,6 +31,8 @@ template class paludis::VirtualConstructor<std::string,
tr1::shared_ptr<Matcher> (*) (const std::string &),
paludis::virtual_constructor_not_found::ThrowException<NoSuchMatcherError> >;
+template class paludis::InstantiationPolicy<MatcherMaker, paludis::instantiation_method::SingletonTag>;
+
Matcher::Matcher()
{
}
diff --git a/src/clients/inquisitio/matcher.hh b/src/clients/inquisitio/matcher.hh
index e1f3be0e0..fcb68917c 100644
--- a/src/clients/inquisitio/matcher.hh
+++ b/src/clients/inquisitio/matcher.hh
@@ -23,6 +23,7 @@
#include <string>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/sr.hh>
+#include <paludis/util/tr1_memory.hh>
#include <paludis/util/virtual_constructor.hh>
namespace inquisitio
diff --git a/src/clients/inquisitio/name_extractor.cc b/src/clients/inquisitio/name_extractor.cc
index 780bb127e..983616e2a 100644
--- a/src/clients/inquisitio/name_extractor.cc
+++ b/src/clients/inquisitio/name_extractor.cc
@@ -18,6 +18,8 @@
*/
#include "name_extractor.hh"
+#include <paludis/util/stringify.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
using namespace inquisitio;
using namespace paludis;
diff --git a/src/clients/inquisitio/pcre_matcher.cc b/src/clients/inquisitio/pcre_matcher.cc
index 015c8b1f1..e91af823e 100644
--- a/src/clients/inquisitio/pcre_matcher.cc
+++ b/src/clients/inquisitio/pcre_matcher.cc
@@ -19,6 +19,7 @@
#include "pcre_matcher.hh"
#include <pcre++.h>
+#include <paludis/util/private_implementation_pattern-impl.hh>
using namespace paludis;
using namespace inquisitio;
diff --git a/src/clients/inquisitio/text_matcher.cc b/src/clients/inquisitio/text_matcher.cc
index dd096fcfe..238434ad3 100644
--- a/src/clients/inquisitio/text_matcher.cc
+++ b/src/clients/inquisitio/text_matcher.cc
@@ -18,6 +18,7 @@
*/
#include "text_matcher.hh"
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <string.h>
using namespace paludis;
diff --git a/src/clients/paludis/command_line.cc b/src/clients/paludis/command_line.cc
index ff59a9f56..8a1da5876 100644
--- a/src/clients/paludis/command_line.cc
+++ b/src/clients/paludis/command_line.cc
@@ -18,9 +18,12 @@
*/
#include "command_line.hh"
+#include <paludis/util/instantiation_policy-impl.hh>
using namespace paludis;
+template class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
+
CommandLine::CommandLine() :
ArgsHandler(),
diff --git a/src/clients/qualudis/qualudis_command_line.cc b/src/clients/qualudis/qualudis_command_line.cc
index b5f2a0c27..7ef07aa14 100644
--- a/src/clients/qualudis/qualudis_command_line.cc
+++ b/src/clients/qualudis/qualudis_command_line.cc
@@ -18,6 +18,9 @@
*/
#include "qualudis_command_line.hh"
+#include <paludis/util/instantiation_policy-impl.hh>
+
+template class paludis::InstantiationPolicy<QualudisCommandLine, paludis::instantiation_method::SingletonTag>;
QualudisCommandLine::QualudisCommandLine() :
ArgsHandler(),
diff --git a/src/common_args/deps_option_arg.cc b/src/common_args/deps_option_arg.cc
index 573eb4493..044411300 100644
--- a/src/common_args/deps_option_arg.cc
+++ b/src/common_args/deps_option_arg.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -19,6 +19,7 @@
#include "deps_option_arg.hh"
#include "do_help.hh"
+#include <paludis/util/stringify.hh>
using namespace paludis;
using namespace paludis::args;
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index bc3a51c09..485fb0510 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -24,6 +24,7 @@
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/query.hh>
#include <list>
diff --git a/test/test_framework.cc b/test/test_framework.cc
index 11a93a8c2..03d5149b8 100644
--- a/test/test_framework.cc
+++ b/test/test_framework.cc
@@ -22,6 +22,7 @@
#include <iostream>
#include <list>
#include <paludis/util/attributes.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
#include <unistd.h>
/** \file