aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-21 16:41:57 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-21 16:41:57 +0000
commit6319f1e7cac9aac93c066f0b1318d71489987cf8 (patch)
tree88642cc0777e2d171adb2c922ed8cc408f152b2c
parent5ffbc8d7c2c91e214417fb3a686584d1bbfa01c5 (diff)
downloadpaludis-6319f1e7cac9aac93c066f0b1318d71489987cf8.tar.gz
paludis-6319f1e7cac9aac93c066f0b1318d71489987cf8.tar.xz
Remove simple_ from visitor
-rw-r--r--doc/api/cplusplus/examples/example_dep_spec_flattener.cc6
-rw-r--r--paludis/action.hh2
-rw-r--r--paludis/args/args_option.hh2
-rw-r--r--paludis/args/args_visitor.hh2
-rw-r--r--paludis/args/man.cc6
-rw-r--r--paludis/broken_linkage_finder.cc4
-rw-r--r--paludis/contents.hh2
-rw-r--r--paludis/create_output_manager_info.hh2
-rw-r--r--paludis/dep_label.hh4
-rw-r--r--paludis/elf_linkage_checker.cc6
-rw-r--r--paludis/elike_conditional_dep_spec.cc4
-rw-r--r--paludis/environment.hh2
-rw-r--r--paludis/environments/paludis/output_conf.cc2
-rw-r--r--paludis/mask.hh2
-rw-r--r--paludis/metadata_key.hh4
-rw-r--r--paludis/ndbam_unmerger.cc4
-rw-r--r--paludis/notifier_callback.hh2
-rw-r--r--paludis/permitted_choice_value_parameter_values.hh2
-rw-r--r--paludis/repositories/accounts/accounts_handler.cc4
-rw-r--r--paludis/repositories/accounts/accounts_id.cc6
-rw-r--r--paludis/repositories/accounts/accounts_repository_store.cc4
-rw-r--r--paludis/repositories/accounts/installed_accounts_id.cc2
-rw-r--r--paludis/repositories/accounts/passwd_accounts_handler.cc22
-rw-r--r--paludis/repositories/e/dep_parser.cc2
-rw-r--r--paludis/repositories/e/e_choices_key.cc2
-rw-r--r--paludis/repositories/e/e_installed_repository.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc12
-rw-r--r--paludis/repositories/e/e_repository_TEST_1.cc12
-rw-r--r--paludis/repositories/e/e_repository_TEST_2.cc18
-rw-r--r--paludis/repositories/e/e_repository_TEST_3.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc46
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc2
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc26
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc4
-rw-r--r--paludis/repositories/e/myoptions_requirements_verifier.cc2
-rw-r--r--paludis/repositories/e/pipe_command_handler.cc10
-rw-r--r--paludis/repositories/e/vdb_repository.cc4
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc8
-rw-r--r--paludis/repositories/gemcutter/gemcutter_id.cc2
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.cc2
-rw-r--r--paludis/repositories/repository/repository_id.cc2
-rw-r--r--paludis/repositories/repository/repository_repository.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_id.cc6
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc6
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc6
-rw-r--r--paludis/repositories/unwritten/unwritten_id.cc4
-rw-r--r--paludis/resolver/always_via_binary_helper.cc4
-rw-r--r--paludis/resolver/collect_depped_upon.cc4
-rw-r--r--paludis/resolver/decider.cc4
-rw-r--r--paludis/resolver/decision.hh2
-rw-r--r--paludis/resolver/decisions.cc2
-rw-r--r--paludis/resolver/find_repository_for_helper.cc2
-rw-r--r--paludis/resolver/get_constraints_for_dependent_helper.cc2
-rw-r--r--paludis/resolver/get_constraints_for_purge_helper.cc2
-rw-r--r--paludis/resolver/get_constraints_for_via_binary_helper.cc2
-rw-r--r--paludis/resolver/get_destination_types_for_blocker_helper.cc2
-rw-r--r--paludis/resolver/get_destination_types_for_error_helper.cc2
-rw-r--r--paludis/resolver/get_initial_constraints_for_helper.cc2
-rw-r--r--paludis/resolver/job.hh2
-rw-r--r--paludis/resolver/job_state.hh2
-rw-r--r--paludis/resolver/orderer.cc6
-rw-r--r--paludis/resolver/package_or_block_dep_spec.cc2
-rw-r--r--paludis/resolver/reason.hh2
-rw-r--r--paludis/resolver/required_confirmations.hh4
-rw-r--r--paludis/resolver/resolver_TEST_continue_on_failure.cc18
-rw-r--r--paludis/resolver/resolver_TEST_fetches.cc12
-rw-r--r--paludis/resolver/resolver_TEST_uninstalls.cc4
-rw-r--r--paludis/resolver/resolver_test.cc12
-rw-r--r--paludis/slot_requirement.hh4
-rw-r--r--paludis/spec_tree.hh2
-rw-r--r--paludis/util/elf_dynamic_section.hh2
-rw-r--r--paludis/util/elf_sections.hh2
-rw-r--r--paludis/util/files.m44
-rw-r--r--paludis/util/visitor-fwd.hh (renamed from paludis/util/simple_visitor-fwd.hh)6
-rw-r--r--paludis/util/visitor-impl.hh (renamed from paludis/util/simple_visitor-impl.hh)8
-rw-r--r--paludis/util/visitor.cc (renamed from paludis/util/simple_visitor.cc)4
-rw-r--r--paludis/util/visitor.hh (renamed from paludis/util/simple_visitor.hh)8
-rw-r--r--paludis/util/visitor_cast-fwd.hh (renamed from paludis/util/simple_visitor_cast-fwd.hh)8
-rw-r--r--paludis/util/visitor_cast.cc (renamed from paludis/util/simple_visitor_cast.cc)4
-rw-r--r--paludis/util/visitor_cast.hh (renamed from paludis/util/simple_visitor_cast.hh)24
-rw-r--r--ruby/metadata_key.cc6
-rw-r--r--src/clients/cave/cmd_digest.cc2
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc2
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc14
-rw-r--r--src/clients/cave/cmd_find_candidates.cc2
-rw-r--r--src/clients/cave/cmd_generate_metadata.cc2
-rw-r--r--src/clients/cave/cmd_has_version.cc2
-rw-r--r--src/clients/cave/cmd_info.cc6
-rw-r--r--src/clients/cave/cmd_manage_search_index.cc4
-rw-r--r--src/clients/cave/cmd_match.cc2
-rw-r--r--src/clients/cave/cmd_mirror.cc2
-rw-r--r--src/clients/cave/cmd_print_best_version.cc2
-rw-r--r--src/clients/cave/cmd_print_environment_metadata.cc6
-rw-r--r--src/clients/cave/cmd_print_id_masks.cc2
-rw-r--r--src/clients/cave/cmd_print_id_metadata.cc4
-rw-r--r--src/clients/cave/cmd_print_ids.cc12
-rw-r--r--src/clients/cave/cmd_print_repository_metadata.cc6
-rw-r--r--src/clients/cave/cmd_print_set.cc4
-rw-r--r--src/clients/cave/cmd_print_spec.cc4
-rw-r--r--src/clients/cave/cmd_print_unused_distfiles.cc6
-rw-r--r--src/clients/cave/cmd_report.cc2
-rw-r--r--src/clients/cave/cmd_show.cc6
-rw-r--r--src/clients/cave/cmd_verify.cc6
-rw-r--r--src/clients/cave/resolve_common.cc6
-rw-r--r--src/clients/instruo/instruo.cc8
112 files changed, 299 insertions, 299 deletions
diff --git a/doc/api/cplusplus/examples/example_dep_spec_flattener.cc b/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
index f916eb6..ce59d07 100644
--- a/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
+++ b/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
@@ -84,15 +84,15 @@ int main(int argc, char * argv[])
/* And again for restricts. There's no global restrict key, since
* it has no meaning outside of the repositories that support it.
* Instead, we use PackageID::find_metadata to see if the key we
- * want exists, and then simple_visitor_cast<> to see whether it's
+ * want exists, and then visitor_cast<> to see whether it's
* of a suitable type (the key could be something other than a
* MetadataSpecTreeKey<PlainTextSpecTree>). */
if ((*i)->end_metadata() != (*i)->find_metadata("RESTRICT") &&
- simple_visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(**(*i)->find_metadata("RESTRICT")))
+ visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(**(*i)->find_metadata("RESTRICT")))
{
DepSpecFlattener<PlainTextSpecTree, PlainTextDepSpec> restricts(env.get(), *i);
- simple_visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(
+ visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(
**(*i)->find_metadata("RESTRICT"))->value()->top()->accept(restricts);
cout << " " << left << setw(24) << "Restricts:" << " "
diff --git a/paludis/action.hh b/paludis/action.hh
index 5fa9c72..fdf1589 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -24,7 +24,7 @@
#include <paludis/repository-fwd.hh>
#include <paludis/package_id-fwd.hh>
#include <paludis/util/attributes.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/pimp.hh>
#include <paludis/util/sequence-fwd.hh>
diff --git a/paludis/args/args_option.hh b/paludis/args/args_option.hh
index 6511f07..67db22f 100644
--- a/paludis/args/args_option.hh
+++ b/paludis/args/args_option.hh
@@ -25,7 +25,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/named_value.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/sequence-fwd.hh>
#include <memory>
diff --git a/paludis/args/args_visitor.hh b/paludis/args/args_visitor.hh
index 8eb7cfe..8f95036 100644
--- a/paludis/args/args_visitor.hh
+++ b/paludis/args/args_visitor.hh
@@ -21,7 +21,7 @@
#ifndef PALUDIS_GUARD_ARGS_ARGS_VISITOR_HH
#define PALUDIS_GUARD_ARGS_ARGS_VISITOR_HH 1
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/pimp.hh>
diff --git a/paludis/args/man.cc b/paludis/args/man.cc
index b131c05..7245d24 100644
--- a/paludis/args/man.cc
+++ b/paludis/args/man.cc
@@ -19,7 +19,7 @@
*/
#include "man.hh"
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <functional>
#include <ostream>
@@ -142,8 +142,8 @@ paludis::args::generate_doc(DocWriter & dw, const ArgsHandler * const h)
for (paludis::args::ArgsGroup::ConstIterator b(a->begin()), b_end(a->end()) ;
b != b_end ; ++b)
{
- if (simple_visitor_cast<const paludis::args::AliasArg>(**b) &&
- simple_visitor_cast<const paludis::args::AliasArg>(**b)->hidden())
+ if (visitor_cast<const paludis::args::AliasArg>(**b) &&
+ visitor_cast<const paludis::args::AliasArg>(**b)->hidden())
continue;
dw.arg_group_item((*b)->short_name(), (*b)->long_name(),
diff --git a/paludis/broken_linkage_finder.cc b/paludis/broken_linkage_finder.cc
index 9e81c20..7079a1b 100644
--- a/paludis/broken_linkage_finder.cc
+++ b/paludis/broken_linkage_finder.cc
@@ -29,7 +29,7 @@
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/set-impl.hh>
#include <paludis/util/sequence-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/member_iterator-impl.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -341,7 +341,7 @@ Imp<BrokenLinkageFinder>::gather_package(const std::shared_ptr<const PackageID>
for (Contents::ConstIterator it(contents->begin()),
it_end(contents->end()); it_end != it; ++it)
{
- const ContentsFileEntry * file(simple_visitor_cast<const ContentsFileEntry>(**it));
+ const ContentsFileEntry * file(visitor_cast<const ContentsFileEntry>(**it));
if (0 != file)
{
Lock l(mutex);
diff --git a/paludis/contents.hh b/paludis/contents.hh
index b4909e1..38fde1a 100644
--- a/paludis/contents.hh
+++ b/paludis/contents.hh
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_CONTENTS_HH 1
#include <paludis/contents-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/pimp.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
diff --git a/paludis/create_output_manager_info.hh b/paludis/create_output_manager_info.hh
index 0063ed3..d1235e9 100644
--- a/paludis/create_output_manager_info.hh
+++ b/paludis/create_output_manager_info.hh
@@ -22,7 +22,7 @@
#include <paludis/create_output_manager_info-fwd.hh>
#include <paludis/util/pimp.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/type_list.hh>
#include <paludis/package_id-fwd.hh>
diff --git a/paludis/dep_label.hh b/paludis/dep_label.hh
index 57ad3a1..b62bac0 100644
--- a/paludis/dep_label.hh
+++ b/paludis/dep_label.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 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
@@ -24,7 +24,7 @@
#include <paludis/dep_spec-fwd.hh>
#include <paludis/environment-fwd.hh>
#include <paludis/package_id-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/pimp.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/type_list.hh>
diff --git a/paludis/elf_linkage_checker.cc b/paludis/elf_linkage_checker.cc
index 4ddf5cf..e831888 100644
--- a/paludis/elf_linkage_checker.cc
+++ b/paludis/elf_linkage_checker.cc
@@ -33,7 +33,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/member_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/fs_path.hh>
@@ -184,13 +184,13 @@ Imp<ElfLinkageChecker>::check_elf(const FSPath & file, std::istream & stream)
for (typename ElfObject<ElfType_>::SectionIterator sec_it(elf.section_begin()),
sec_it_end(elf.section_end()); sec_it_end != sec_it; ++sec_it)
{
- const DynamicSection<ElfType_> * dyn_sec(simple_visitor_cast<const DynamicSection<ElfType_> >(*sec_it));
+ const DynamicSection<ElfType_> * dyn_sec(visitor_cast<const DynamicSection<ElfType_> >(*sec_it));
if (0 != dyn_sec)
for (typename DynamicSection<ElfType_>::EntryIterator ent_it(dyn_sec->entry_begin()),
ent_it_end(dyn_sec->entry_end()); ent_it_end != ent_it; ++ent_it)
{
- const DynamicEntryString<ElfType_> * ent_str(simple_visitor_cast<const DynamicEntryString<ElfType_> >(*ent_it));
+ const DynamicEntryString<ElfType_> * ent_str(visitor_cast<const DynamicEntryString<ElfType_> >(*ent_it));
if (0 != ent_str && "NEEDED" == ent_str->tag_name())
{
diff --git a/paludis/elike_conditional_dep_spec.cc b/paludis/elike_conditional_dep_spec.cc
index 29ac101..3c36498 100644
--- a/paludis/elike_conditional_dep_spec.cc
+++ b/paludis/elike_conditional_dep_spec.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2010, 2011 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
@@ -21,7 +21,7 @@
#include <paludis/util/exception.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/log.hh>
diff --git a/paludis/environment.hh b/paludis/environment.hh
index 86d9d63..eb9bfa2 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -23,7 +23,7 @@
#include <paludis/environment-fwd.hh>
#include <paludis/util/options-fwd.hh>
#include <paludis/util/tribool-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/output_manager-fwd.hh>
#include <paludis/util/pimp.hh>
#include <paludis/name-fwd.hh>
diff --git a/paludis/environments/paludis/output_conf.cc b/paludis/environments/paludis/output_conf.cc
index a8ad2cb..3b9d50a 100644
--- a/paludis/environments/paludis/output_conf.cc
+++ b/paludis/environments/paludis/output_conf.cc
@@ -33,7 +33,7 @@
#include <paludis/util/options.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/tribool.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/simple_parser.hh>
#include <paludis/util/make_null_shared_ptr.hh>
diff --git a/paludis/mask.hh b/paludis/mask.hh
index 2587060..5528842 100644
--- a/paludis/mask.hh
+++ b/paludis/mask.hh
@@ -23,7 +23,7 @@
#include <paludis/mask-fwd.hh>
#include <paludis/package_id-fwd.hh>
#include <paludis/dep_spec-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/fs_path.hh>
#include <paludis/util/sequence-fwd.hh>
diff --git a/paludis/metadata_key.hh b/paludis/metadata_key.hh
index e70cc1c..a8d2c3b 100644
--- a/paludis/metadata_key.hh
+++ b/paludis/metadata_key.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 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
@@ -35,7 +35,7 @@
#include <paludis/util/fs_path-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/remove_shared_ptr.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/timestamp-fwd.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/ndbam_unmerger.cc b/paludis/ndbam_unmerger.cc
index c2397d4..71aefb3 100644
--- a/paludis/ndbam_unmerger.cc
+++ b/paludis/ndbam_unmerger.cc
@@ -35,7 +35,7 @@
#include <paludis/util/strip.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/set.hh>
#include <paludis/util/timestamp.hh>
@@ -193,7 +193,7 @@ namespace
if (m == h.end_metadata())
throw InternalError(PALUDIS_HERE, "Expected key '" + r + "' not found");
- const T_ * const c(simple_visitor_cast<const T_>(**m));
+ const T_ * const c(visitor_cast<const T_>(**m));
if (! c)
throw InternalError(PALUDIS_HERE, "Key '" + r + "' is of wrong type");
diff --git a/paludis/notifier_callback.hh b/paludis/notifier_callback.hh
index 935214b..9fbf597 100644
--- a/paludis/notifier_callback.hh
+++ b/paludis/notifier_callback.hh
@@ -22,7 +22,7 @@
#include <paludis/notifier_callback-fwd.hh>
#include <paludis/util/pimp.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/fs_path.hh>
#include <paludis/name.hh>
diff --git a/paludis/permitted_choice_value_parameter_values.hh b/paludis/permitted_choice_value_parameter_values.hh
index bae36ce..a48ca80 100644
--- a/paludis/permitted_choice_value_parameter_values.hh
+++ b/paludis/permitted_choice_value_parameter_values.hh
@@ -22,7 +22,7 @@
#include <paludis/permitted_choice_value_parameter_values-fwd.hh>
#include <paludis/util/attributes.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/map-fwd.hh>
#include <memory>
diff --git a/paludis/repositories/accounts/accounts_handler.cc b/paludis/repositories/accounts/accounts_handler.cc
index 7206907..fd28a8e 100644
--- a/paludis/repositories/accounts/accounts_handler.cc
+++ b/paludis/repositories/accounts/accounts_handler.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 2009, 2011 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
@@ -18,7 +18,7 @@
*/
#include <paludis/repositories/accounts/accounts_handler.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/action.hh>
using namespace paludis;
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index fd0d66a..1b196e4 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -25,7 +25,7 @@
#include <paludis/util/options.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/make_named_values.hh>
@@ -464,7 +464,7 @@ AccountsID::extra_hash_value() const
bool
AccountsID::supports_action(const SupportsActionTestBase & test) const
{
- return simple_visitor_cast<const SupportsActionTest<InstallAction> >(test);
+ return visitor_cast<const SupportsActionTest<InstallAction> >(test);
}
namespace
@@ -490,7 +490,7 @@ AccountsID::perform_action(Action & action) const
{
Timestamp build_start_time(Timestamp::now());
- const InstallAction * const install_action(simple_visitor_cast<const InstallAction>(action));
+ const InstallAction * const install_action(visitor_cast<const InstallAction>(action));
if (! install_action)
throw ActionFailedError("Unsupported action: " + action.simple_name());
diff --git a/paludis/repositories/accounts/accounts_repository_store.cc b/paludis/repositories/accounts/accounts_repository_store.cc
index e32d3d3..fb782e3 100644
--- a/paludis/repositories/accounts/accounts_repository_store.cc
+++ b/paludis/repositories/accounts/accounts_repository_store.cc
@@ -28,7 +28,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/options.hh>
@@ -115,7 +115,7 @@ AccountsRepositoryStore::_load(const RepositoryName & repository_name)
continue;
}
- const MetadataValueKey<FSPath> * k(simple_visitor_cast<const MetadataValueKey<FSPath> >(**k_iter));
+ const MetadataValueKey<FSPath> * k(visitor_cast<const MetadataValueKey<FSPath> >(**k_iter));
if (! k)
{
Log::get_instance()->message("accounts.bad_key_from_repository", ll_warning, lc_context) <<
diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc
index d58fc84..24fe801 100644
--- a/paludis/repositories/accounts/installed_accounts_id.cc
+++ b/paludis/repositories/accounts/installed_accounts_id.cc
@@ -24,7 +24,7 @@
#include <paludis/util/options.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/hashes.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/mutex.hh>
diff --git a/paludis/repositories/accounts/passwd_accounts_handler.cc b/paludis/repositories/accounts/passwd_accounts_handler.cc
index 59deece..bac2cb2 100644
--- a/paludis/repositories/accounts/passwd_accounts_handler.cc
+++ b/paludis/repositories/accounts/passwd_accounts_handler.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2009, 2010, 2011 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
@@ -20,7 +20,7 @@
#include <paludis/repositories/accounts/passwd_accounts_handler.hh>
#include <paludis/util/system.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/join.hh>
@@ -62,7 +62,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
throw ActionFailedError("Key 'username' for '" + stringify(*params.package_id()) + "' does not exist");
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'username' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -79,7 +79,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'gecos' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -99,7 +99,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'preferred_uid' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -126,7 +126,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'primary_group' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -146,7 +146,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataCollectionKey<Set<std::string> > * k(simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
+ const MetadataCollectionKey<Set<std::string> > * k(visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
if (! k)
throw ActionFailedError("Key 'extra_groups' for '" + stringify(*params.package_id()) + "' is not a string set key");
@@ -166,7 +166,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'shell' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -186,7 +186,7 @@ PasswdAccountsHandler::merge_user(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'home' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -218,7 +218,7 @@ PasswdAccountsHandler::merge_group(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
throw ActionFailedError("Key 'groupname' for '" + stringify(*params.package_id()) + "' does not exist");
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'groupname' for '" + stringify(*params.package_id()) + "' is not a string key");
@@ -235,7 +235,7 @@ PasswdAccountsHandler::merge_group(const MergeParams & params)
if (params.package_id()->end_metadata() == m)
break;
- const MetadataValueKey<std::string> * k(simple_visitor_cast<const MetadataValueKey<std::string> >(**m));
+ const MetadataValueKey<std::string> * k(visitor_cast<const MetadataValueKey<std::string> >(**m));
if (! k)
throw ActionFailedError("Key 'preferred_gid' for '" + stringify(*params.package_id()) + "' is not a string key");
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 5a3c707..aaf6291 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -27,7 +27,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/singleton-impl.hh>
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index b4d55ef..0bd3f29 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -30,7 +30,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/join.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/member_iterator-impl.hh>
#include <paludis/util/map-impl.hh>
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index e437114..05211ef 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -24,7 +24,7 @@
#include <paludis/repositories/e/eapi_phase.hh>
#include <paludis/repositories/e/ebuild.hh>
#include <paludis/repositories/e/e_repository.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
@@ -319,7 +319,7 @@ EInstalledRepository::perform_info(
if (r->end_metadata() != m)
{
const MetadataCollectionKey<Set<std::string> > * const mm(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
if (mm)
{
i = mm->value();
@@ -342,7 +342,7 @@ EInstalledRepository::perform_info(
if ((*r)->end_metadata() != m)
{
const MetadataCollectionKey<Set<std::string> > * const mm(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
if (mm)
{
i = mm->value();
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 3ea84e7..6c0de7c 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -27,7 +27,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -500,8 +500,8 @@ namespace test_cases
&env, { })), make_null_shared_ptr(), { }))]->begin());
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
- TEST_CHECK(simple_visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI")));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK(visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI")));
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI"))->value(), "0");
TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Description");
UnformattedPrettyPrinter ff;
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index df8e925..010f1b7 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -288,7 +288,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-0",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -298,7 +298,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-0",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
@@ -308,7 +308,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-0",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
@@ -318,7 +318,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-0",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
@@ -373,7 +373,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-0",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
}
diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc
index 45a7094..a78be24 100644
--- a/paludis/repositories/e/e_repository_TEST_1.cc
+++ b/paludis/repositories/e/e_repository_TEST_1.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -141,7 +141,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-1",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -151,7 +151,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-1",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -161,7 +161,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-1",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -171,7 +171,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-1",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -181,7 +181,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-1",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
}
diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc
index c3484d7..c194837 100644
--- a/paludis/repositories/e/e_repository_TEST_2.cc
+++ b/paludis/repositories/e/e_repository_TEST_2.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -141,7 +141,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -151,7 +151,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -161,7 +161,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -171,7 +171,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -181,7 +181,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_configure-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -191,7 +191,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_compile-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -201,7 +201,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_compile-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -211,7 +211,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/src_compile-via-default-func-2",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
}
diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc
index aae03fe..f6ce41c 100644
--- a/paludis/repositories/e/e_repository_TEST_3.cc
+++ b/paludis/repositories/e/e_repository_TEST_3.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -141,7 +141,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/prefix-3",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "3");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "3");
id->perform_action(action);
}
}
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index 4606a43..33b3151 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -27,7 +27,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -148,7 +148,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg_pretend-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
}
@@ -159,7 +159,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg_pretend-failure-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(pretend_action.failed());
}
@@ -170,7 +170,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_install-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -180,7 +180,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/docompress-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -190,7 +190,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/dodoc-r-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -200,7 +200,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/doins-symlink-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -210,7 +210,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/banned-functions-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -220,7 +220,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -230,7 +230,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/global-scope-use-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -240,7 +240,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-4",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
}
@@ -306,7 +306,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
}
@@ -393,7 +393,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -412,7 +412,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/merge-type-bin-4::binrepo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "pbin-1+4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "pbin-1+4");
id->perform_action(action);
}
}
@@ -475,7 +475,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-all-good-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
}
@@ -492,7 +492,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-all-empty-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
}
@@ -509,7 +509,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-all-one-not-good-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(pretend_action.failed());
}
@@ -526,7 +526,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-any-good-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
}
@@ -543,7 +543,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-any-empty-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
}
@@ -560,7 +560,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-any-none-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(pretend_action.failed());
}
@@ -577,7 +577,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-one-none-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(pretend_action.failed());
}
@@ -594,7 +594,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-one-none-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(pretend_action.failed());
}
@@ -611,7 +611,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/required-use-one-good-4::test-repo",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
}
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index 40711ce..e093ef4 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 0772d3b..1d4a9fe 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index 1cc6372..9e5e0fd 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -27,7 +27,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
index acd4cf9..aa0c5eb 100644
--- a/paludis/repositories/e/e_repository_TEST_pbin.cc
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
@@ -172,7 +172,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1",
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), base_eapi);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), base_eapi);
id->perform_action(bin_action);
}
@@ -193,7 +193,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1::binrepo" + base_eapi,
&env, { })), make_null_shared_ptr(), { }))]->last());
TEST_CHECK(bool(id));
- TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(),
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(),
"pbin-1+" + base_eapi);
id->perform_action(install_action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index b8cb0a4..54fe4f0 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
index e92c754..258a899 100644
--- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
+++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
@@ -26,7 +26,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
index 7005da7..a02906b 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
@@ -29,7 +29,7 @@
#include <paludis/util/map.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/set.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/timestamp.hh>
@@ -168,8 +168,8 @@ namespace test_cases
TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list-eclass");
TEST_CHECK_EQUAL(join(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
}
} test_metadata_flat_list_eclass_cached;
@@ -621,8 +621,8 @@ namespace test_cases
TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-eclass");
TEST_CHECK_EQUAL(join(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
}
} test_metadata_flat_hash_eclass;
@@ -735,8 +735,8 @@ namespace test_cases
TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-full-eclass");
TEST_CHECK_EQUAL(join(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
}
} test_metadata_flat_hash_full_eclass;
@@ -766,8 +766,8 @@ namespace test_cases
TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-full-eclass-nonstandard");
TEST_CHECK_EQUAL(join(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "bar foo");
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "bar foo");
}
} test_metadata_flat_hash_full_eclass_nonstandard;
@@ -973,8 +973,8 @@ namespace test_cases
TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-exlib");
TEST_CHECK_EQUAL(join(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "foo");
}
} test_metadata_flat_hash_exlib;
@@ -1005,8 +1005,8 @@ namespace test_cases
TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-exlib-percat");
TEST_CHECK_EQUAL(join(
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
- simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "bar foo");
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->end(), " "), "bar foo");
}
} test_metadata_flat_hash_exlib_per_category;
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index a17a5d5..e312277 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -19,7 +19,7 @@
#include <paludis/repositories/e/fix_locked_dependencies.hh>
#include <paludis/repositories/e/eapi.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/options.hh>
@@ -103,7 +103,7 @@ namespace
if (! node.spec()->slot_requirement_ptr())
break;
- const SlotAnyLockedRequirement * const r(simple_visitor_cast<const SlotAnyLockedRequirement>(*node.spec()->slot_requirement_ptr()));
+ const SlotAnyLockedRequirement * const r(visitor_cast<const SlotAnyLockedRequirement>(*node.spec()->slot_requirement_ptr()));
if (! r)
break;
diff --git a/paludis/repositories/e/myoptions_requirements_verifier.cc b/paludis/repositories/e/myoptions_requirements_verifier.cc
index b57030a..a82c8fe 100644
--- a/paludis/repositories/e/myoptions_requirements_verifier.cc
+++ b/paludis/repositories/e/myoptions_requirements_verifier.cc
@@ -23,7 +23,7 @@
#include <paludis/repositories/e/myoption.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/log.hh>
#include <paludis/util/set.hh>
diff --git a/paludis/repositories/e/pipe_command_handler.cc b/paludis/repositories/e/pipe_command_handler.cc
index 8a81d03..51940de 100644
--- a/paludis/repositories/e/pipe_command_handler.cc
+++ b/paludis/repositories/e/pipe_command_handler.cc
@@ -32,7 +32,7 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
@@ -424,9 +424,9 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
Repository::MetadataConstIterator key(repo->find_metadata("location"));
if (repo->end_metadata() == key)
return "Einstalled repository has no location key";
- if (! simple_visitor_cast<const MetadataValueKey<FSPath> >(**key))
+ if (! visitor_cast<const MetadataValueKey<FSPath> >(**key))
return "Einstalled repository location key is not a MetadataValueKey<FSPath> ";
- return "O0;" + stringify(simple_visitor_cast<const MetadataValueKey<FSPath> >(**key)->value());
+ return "O0;" + stringify(visitor_cast<const MetadataValueKey<FSPath> >(**key)->value());
}
}
else if (tokens[0] == "OPTIONQ")
@@ -490,7 +490,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
throw InternalError(PALUDIS_HERE, "oops. can't find key '" + var + "'");
const MetadataSpecTreeKey<DependencySpecTree> * mm(
- simple_visitor_cast<const MetadataSpecTreeKey<DependencySpecTree> >(**m));
+ visitor_cast<const MetadataSpecTreeKey<DependencySpecTree> >(**m));
if (! mm)
throw InternalError(PALUDIS_HERE, "oops. key '" + var + "' isn't a DependencySpecTree key");
@@ -511,7 +511,7 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
throw InternalError(PALUDIS_HERE, "oops. can't find key '" + var + "'");
const MetadataSpecTreeKey<PlainTextSpecTree> * mm(
- simple_visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(**m));
+ visitor_cast<const MetadataSpecTreeKey<PlainTextSpecTree> >(**m));
if (! mm)
throw InternalError(PALUDIS_HERE, "oops. key '" + var + "' isn't a PlainTextSpecTree key");
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index ba5bd06..9042468 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -70,7 +70,7 @@
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
@@ -1361,7 +1361,7 @@ VDBRepository::perform_updates()
continue;
}
- const MetadataValueKey<FSPath> * k(simple_visitor_cast<const MetadataValueKey<FSPath> >(**k_iter));
+ const MetadataValueKey<FSPath> * k(visitor_cast<const MetadataValueKey<FSPath> >(**k_iter));
if (! k)
{
Log::get_instance()->message("e.vdb.udpates.bad_key", ll_warning, lc_context) <<
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index caa570d..631d1f2 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -21,8 +21,6 @@
#include "vdb_unmerger.hh"
#include "vdb_contents_tokeniser.hh"
-using namespace paludis;
-
#include <paludis/util/destringify.hh>
#include <paludis/util/md5.hh>
#include <paludis/environment.hh>
@@ -38,7 +36,7 @@ using namespace paludis;
#include <paludis/util/tokeniser.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/timestamp.hh>
#include <paludis/util/fs_stat.hh>
@@ -50,6 +48,8 @@ using namespace paludis;
#include <map>
#include <vector>
+using namespace paludis;
+
namespace paludis
{
template<>
@@ -208,7 +208,7 @@ namespace
if (m == h.end_metadata())
throw InternalError(PALUDIS_HERE, "Expected key '" + r + "' not found");
- const T_ * const c(simple_visitor_cast<const T_>(**m));
+ const T_ * const c(visitor_cast<const T_>(**m));
if (! c)
throw InternalError(PALUDIS_HERE, "Key '" + r + "' is of wrong type");
diff --git a/paludis/repositories/gemcutter/gemcutter_id.cc b/paludis/repositories/gemcutter/gemcutter_id.cc
index 3a522ec..39e4dd0 100644
--- a/paludis/repositories/gemcutter/gemcutter_id.cc
+++ b/paludis/repositories/gemcutter/gemcutter_id.cc
@@ -23,7 +23,7 @@
#include <paludis/repositories/gemcutter/gemcutter_dependencies_key.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.cc b/paludis/repositories/gemcutter/gemcutter_repository.cc
index 28c31f7..48abd72 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.cc
+++ b/paludis/repositories/gemcutter/gemcutter_repository.cc
@@ -25,7 +25,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/simple_parser.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
diff --git a/paludis/repositories/repository/repository_id.cc b/paludis/repositories/repository/repository_id.cc
index ba61e38..34d3102 100644
--- a/paludis/repositories/repository/repository_id.cc
+++ b/paludis/repositories/repository/repository_id.cc
@@ -21,7 +21,7 @@
#include <paludis/repositories/repository/repository_repository.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index 670edcf..3a59887 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -25,7 +25,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/simple_parser.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/safe_ofstream.hh>
@@ -372,7 +372,7 @@ namespace
if (id->end_metadata() == i)
return "";
- const MetadataValueKey<std::string> * const ii(simple_visitor_cast<const MetadataValueKey<std::string> >(**i));
+ const MetadataValueKey<std::string> * const ii(visitor_cast<const MetadataValueKey<std::string> >(**i));
if (! ii)
return "";
diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc
index e69d2da..3f2498a 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.cc
+++ b/paludis/repositories/unavailable/unavailable_package_id.cc
@@ -21,7 +21,7 @@
#include <paludis/repositories/unavailable/unavailable_repository.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
@@ -160,7 +160,7 @@ UnavailablePackageID::repository_name() const
bool
UnavailablePackageID::supports_action(const SupportsActionTestBase & a) const
{
- return simple_visitor_cast<const SupportsActionTest<InstallAction> >(a);
+ return visitor_cast<const SupportsActionTest<InstallAction> >(a);
}
void
diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc
index 0a1ff6f..7a1fc26 100644
--- a/paludis/repositories/unavailable/unavailable_repository_id.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_id.cc
@@ -21,7 +21,7 @@
#include <paludis/repositories/unavailable/unavailable_repository.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
@@ -180,7 +180,7 @@ UnavailableRepositoryID::repository_name() const
bool
UnavailableRepositoryID::supports_action(const SupportsActionTestBase & a) const
{
- return simple_visitor_cast<const SupportsActionTest<InstallAction> >(a);
+ return visitor_cast<const SupportsActionTest<InstallAction> >(a);
}
namespace
@@ -207,7 +207,7 @@ UnavailableRepositoryID::perform_action(Action & action) const
{
Timestamp build_start_time(Timestamp::now());
- const InstallAction * const install_action(simple_visitor_cast<const InstallAction>(action));
+ const InstallAction * const install_action(visitor_cast<const InstallAction>(action));
if (! install_action)
throw ActionFailedError("Unsupported action: " + action.simple_name());
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index b69dd1e..dd76324 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -28,7 +28,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/system.hh>
#include <paludis/util/cookie.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
@@ -279,7 +279,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
Repository::MetadataConstIterator k(repo->find_metadata("install_under"));
if (k == repo->end_metadata())
throw ActionFailedError("Could not fetch install_under key from owning repository");
- const MetadataValueKey<FSPath> * kk(simple_visitor_cast<const MetadataValueKey<FSPath> >(**k));
+ const MetadataValueKey<FSPath> * kk(visitor_cast<const MetadataValueKey<FSPath> >(**k));
if (! kk)
throw ActionFailedError("Fetched install_under key but did not get an FSPath key from owning repository");
install_under = kk->value();
@@ -290,7 +290,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
Repository::MetadataConstIterator k(repo->find_metadata("rewrite_ids_over_to_root"));
if (k == repo->end_metadata())
throw ActionFailedError("Could not fetch rewrite_ids_over_to_root key from owning repository");
- const MetadataValueKey<long> * kk(simple_visitor_cast<const MetadataValueKey<long> >(**k));
+ const MetadataValueKey<long> * kk(visitor_cast<const MetadataValueKey<long> >(**k));
if (! kk)
throw ActionFailedError("Fetched rewrite_ids_over_to_root key but did not get a long key from owning repository");
rewrite_ids_over_to_root = kk->value();
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 2d33885..0379f89 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -22,7 +22,7 @@
#include <paludis/repositories/unpackaged/unpackaged_stripper.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/log.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
@@ -335,7 +335,7 @@ UnpackagedID::preserve_work_key() const
bool
UnpackagedID::supports_action(const SupportsActionTestBase & test) const
{
- return simple_visitor_cast<const SupportsActionTest<InstallAction> >(test);
+ return visitor_cast<const SupportsActionTest<InstallAction> >(test);
}
namespace
@@ -374,7 +374,7 @@ UnpackagedID::perform_action(Action & action) const
{
Timestamp build_start_time(Timestamp::now());
- const InstallAction * const install_action(simple_visitor_cast<const InstallAction>(action));
+ const InstallAction * const install_action(visitor_cast<const InstallAction>(action));
if (! install_action)
throw ActionFailedError("Unsupported action: " + action.simple_name());
diff --git a/paludis/repositories/unwritten/unwritten_id.cc b/paludis/repositories/unwritten/unwritten_id.cc
index 588b93e..470705d 100644
--- a/paludis/repositories/unwritten/unwritten_id.cc
+++ b/paludis/repositories/unwritten/unwritten_id.cc
@@ -21,7 +21,7 @@
#include <paludis/repositories/unwritten/unwritten_repository.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_null_shared_ptr.hh>
@@ -177,7 +177,7 @@ UnwrittenID::repository_name() const
bool
UnwrittenID::supports_action(const SupportsActionTestBase & a) const
{
- return simple_visitor_cast<const SupportsActionTest<InstallAction> >(a);
+ return visitor_cast<const SupportsActionTest<InstallAction> >(a);
}
void
diff --git a/paludis/resolver/always_via_binary_helper.cc b/paludis/resolver/always_via_binary_helper.cc
index 9839a1a..f5ce4dd 100644
--- a/paludis/resolver/always_via_binary_helper.cc
+++ b/paludis/resolver/always_via_binary_helper.cc
@@ -25,7 +25,7 @@
#include <paludis/resolver/decision.hh>
#include <paludis/resolver/destination_utils.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/dep_spec.hh>
#include <paludis/package_id.hh>
@@ -67,7 +67,7 @@ AlwaysViaBinaryHelper::add_always_via_binary_spec(const PackageDepSpec & spec)
bool
AlwaysViaBinaryHelper::operator() (const std::shared_ptr<const Resolution> & resolution) const
{
- const ChangesToMakeDecision * changes_decision(simple_visitor_cast<const ChangesToMakeDecision>(*resolution->decision()));
+ const ChangesToMakeDecision * changes_decision(visitor_cast<const ChangesToMakeDecision>(*resolution->decision()));
if (! changes_decision)
return false;
diff --git a/paludis/resolver/collect_depped_upon.cc b/paludis/resolver/collect_depped_upon.cc
index fdfd572..99ea002 100644
--- a/paludis/resolver/collect_depped_upon.cc
+++ b/paludis/resolver/collect_depped_upon.cc
@@ -19,7 +19,7 @@
#include <paludis/resolver/collect_depped_upon.hh>
#include <paludis/resolver/change_by_resolvent.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/accept_visitor.hh>
@@ -106,7 +106,7 @@ namespace
{
auto spec(s.spec());
- if (s.spec()->slot_requirement_ptr() && simple_visitor_cast<const SlotAnyUnlockedRequirement>(
+ if (s.spec()->slot_requirement_ptr() && visitor_cast<const SlotAnyUnlockedRequirement>(
*s.spec()->slot_requirement_ptr()))
{
auto best_eventual_id(best_eventual(env, *s.spec(), id, newly_available));
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index afc9907..5cd3187 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -49,7 +49,7 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/environment.hh>
@@ -185,7 +185,7 @@ Decider::_resolve_vias()
for (Constraints::ConstIterator c(binary_resolution->constraints()->begin()),
c_end(binary_resolution->constraints()->end()) ;
c != c_end ; ++c)
- if (simple_visitor_cast<const ViaBinaryReason>(*(*c)->reason()))
+ if (visitor_cast<const ViaBinaryReason>(*(*c)->reason()))
{
already = true;
break;
diff --git a/paludis/resolver/decision.hh b/paludis/resolver/decision.hh
index 2f31fbb..f107072 100644
--- a/paludis/resolver/decision.hh
+++ b/paludis/resolver/decision.hh
@@ -28,7 +28,7 @@
#include <paludis/resolver/required_confirmations-fwd.hh>
#include <paludis/resolver/why_changed_choices-fwd.hh>
#include <paludis/util/pimp.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/serialise-fwd.hh>
#include <paludis/package_id-fwd.hh>
diff --git a/paludis/resolver/decisions.cc b/paludis/resolver/decisions.cc
index a620ec0..f1098f1 100644
--- a/paludis/resolver/decisions.cc
+++ b/paludis/resolver/decisions.cc
@@ -21,7 +21,7 @@
#include <paludis/resolver/decision.hh>
#include <paludis/resolver/orderer_notes.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
diff --git a/paludis/resolver/find_repository_for_helper.cc b/paludis/resolver/find_repository_for_helper.cc
index 59c6036..ecda6ba 100644
--- a/paludis/resolver/find_repository_for_helper.cc
+++ b/paludis/resolver/find_repository_for_helper.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/stringify.hh>
#include <paludis/dep_spec.hh>
diff --git a/paludis/resolver/get_constraints_for_dependent_helper.cc b/paludis/resolver/get_constraints_for_dependent_helper.cc
index 94d6873..129a7f7 100644
--- a/paludis/resolver/get_constraints_for_dependent_helper.cc
+++ b/paludis/resolver/get_constraints_for_dependent_helper.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
diff --git a/paludis/resolver/get_constraints_for_purge_helper.cc b/paludis/resolver/get_constraints_for_purge_helper.cc
index 1eb80cd..8d48da0 100644
--- a/paludis/resolver/get_constraints_for_purge_helper.cc
+++ b/paludis/resolver/get_constraints_for_purge_helper.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
diff --git a/paludis/resolver/get_constraints_for_via_binary_helper.cc b/paludis/resolver/get_constraints_for_via_binary_helper.cc
index 1442adb..f2d8983 100644
--- a/paludis/resolver/get_constraints_for_via_binary_helper.cc
+++ b/paludis/resolver/get_constraints_for_via_binary_helper.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/stringify.hh>
diff --git a/paludis/resolver/get_destination_types_for_blocker_helper.cc b/paludis/resolver/get_destination_types_for_blocker_helper.cc
index 33503b6..6a8c80d 100644
--- a/paludis/resolver/get_destination_types_for_blocker_helper.cc
+++ b/paludis/resolver/get_destination_types_for_blocker_helper.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/stringify.hh>
diff --git a/paludis/resolver/get_destination_types_for_error_helper.cc b/paludis/resolver/get_destination_types_for_error_helper.cc
index 101410a..efd29b1 100644
--- a/paludis/resolver/get_destination_types_for_error_helper.cc
+++ b/paludis/resolver/get_destination_types_for_error_helper.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/stringify.hh>
diff --git a/paludis/resolver/get_initial_constraints_for_helper.cc b/paludis/resolver/get_initial_constraints_for_helper.cc
index 614a092..4dd3b94 100644
--- a/paludis/resolver/get_initial_constraints_for_helper.cc
+++ b/paludis/resolver/get_initial_constraints_for_helper.cc
@@ -27,7 +27,7 @@
#include <paludis/resolver/match_qpns.hh>
#include <paludis/resolver/suggest_restart.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/stringify.hh>
diff --git a/paludis/resolver/job.hh b/paludis/resolver/job.hh
index 7cfbf66..02eba91 100644
--- a/paludis/resolver/job.hh
+++ b/paludis/resolver/job.hh
@@ -25,7 +25,7 @@
#include <paludis/resolver/job_requirements-fwd.hh>
#include <paludis/resolver/destination_types-fwd.hh>
#include <paludis/util/pimp.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/dep_spec-fwd.hh>
#include <paludis/serialise-fwd.hh>
diff --git a/paludis/resolver/job_state.hh b/paludis/resolver/job_state.hh
index 4387e38..f8d4547 100644
--- a/paludis/resolver/job_state.hh
+++ b/paludis/resolver/job_state.hh
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_RESOLVER_JOB_STATE_HH 1
#include <paludis/resolver/job_state-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/pimp.hh>
#include <paludis/output_manager-fwd.hh>
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 94e98f3..0101254 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -42,7 +42,7 @@
#include <paludis/util/join.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_shared_copy.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/enum_iterator.hh>
#include <paludis/partially_made_package_dep_spec.hh>
@@ -557,7 +557,7 @@ Orderer::_add_binary_cleverness(const std::shared_ptr<const Resolution> & resolu
if (resolution->resolvent().destination_type() != dt_create_binary)
return;
- const ChangesToMakeDecision * changes_decision(simple_visitor_cast<const ChangesToMakeDecision>(*resolution->decision()));
+ const ChangesToMakeDecision * changes_decision(visitor_cast<const ChangesToMakeDecision>(*resolution->decision()));
if (! changes_decision)
return;
@@ -573,7 +573,7 @@ Orderer::_add_binary_cleverness(const std::shared_ptr<const Resolution> & resolu
if (_imp->resolved->resolutions_by_resolvent()->end() == non_binary_resolution)
continue;
- ChangesToMakeDecision * non_binary_changes_decision(simple_visitor_cast<ChangesToMakeDecision>(*(*non_binary_resolution)->decision()));
+ ChangesToMakeDecision * non_binary_changes_decision(visitor_cast<ChangesToMakeDecision>(*(*non_binary_resolution)->decision()));
if (! non_binary_changes_decision)
continue;
diff --git a/paludis/resolver/package_or_block_dep_spec.cc b/paludis/resolver/package_or_block_dep_spec.cc
index 82f9731..17add1e 100644
--- a/paludis/resolver/package_or_block_dep_spec.cc
+++ b/paludis/resolver/package_or_block_dep_spec.cc
@@ -18,7 +18,7 @@
*/
#include <paludis/resolver/package_or_block_dep_spec.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/log.hh>
#include <paludis/util/map.hh>
#include <paludis/util/sequence-impl.hh>
diff --git a/paludis/resolver/reason.hh b/paludis/resolver/reason.hh
index 322c198..0c6745b 100644
--- a/paludis/resolver/reason.hh
+++ b/paludis/resolver/reason.hh
@@ -25,7 +25,7 @@
#include <paludis/resolver/sanitised_dependencies-fwd.hh>
#include <paludis/resolver/change_by_resolvent-fwd.hh>
#include <paludis/util/pimp.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/tribool.hh>
#include <paludis/name-fwd.hh>
diff --git a/paludis/resolver/required_confirmations.hh b/paludis/resolver/required_confirmations.hh
index 622ec56..9f62e44 100644
--- a/paludis/resolver/required_confirmations.hh
+++ b/paludis/resolver/required_confirmations.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_RESOLVER_REQUIRED_CONFIRMATIONS_HH 1
#include <paludis/resolver/required_confirmations-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <paludis/util/attributes.hh>
#include <paludis/serialise-fwd.hh>
diff --git a/paludis/resolver/resolver_TEST_continue_on_failure.cc b/paludis/resolver/resolver_TEST_continue_on_failure.cc
index 29da328..aba3279 100644
--- a/paludis/resolver/resolver_TEST_continue_on_failure.cc
+++ b/paludis/resolver/resolver_TEST_continue_on_failure.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -38,7 +38,7 @@
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/make_shared_copy.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/repository_factory.hh>
#include <paludis/package_database.hh>
@@ -124,17 +124,17 @@ namespace test_cases
TEST_CHECK_EQUAL(resolved->job_lists()->execute_job_list()->length(), 6);
- const InstallJob * const direct_dep_job(simple_visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(1)));
+ const InstallJob * const direct_dep_job(visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(1)));
TEST_CHECK(direct_dep_job);
TEST_CHECK_EQUAL(join(direct_dep_job->requirements()->begin(), direct_dep_job->requirements()->end(), ", ", stringify_req),
"0 satisfied independent always");
- const InstallJob * const indirect_dep_job(simple_visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(3)));
+ const InstallJob * const indirect_dep_job(visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(3)));
TEST_CHECK(indirect_dep_job);
TEST_CHECK_EQUAL(join(indirect_dep_job->requirements()->begin(), indirect_dep_job->requirements()->end(), ", ", stringify_req),
"2 satisfied independent always");
- const InstallJob * const target_job(simple_visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(5)));
+ const InstallJob * const target_job(visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(5)));
TEST_CHECK(target_job);
if (direct_dep_installed)
TEST_CHECK_EQUAL(join(target_job->requirements()->begin(), target_job->requirements()->end(), ", ", stringify_req),
@@ -192,22 +192,22 @@ namespace test_cases
TEST_CHECK_EQUAL(resolved->job_lists()->execute_job_list()->length(), 4);
- const UninstallJob * const needs_target_job(simple_visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(0)));
+ const UninstallJob * const needs_target_job(visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(0)));
TEST_CHECK(needs_target_job);
TEST_CHECK_EQUAL(join(needs_target_job->requirements()->begin(), needs_target_job->requirements()->end(), ", ", stringify_req),
"");
- const UninstallJob * const target_job(simple_visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(1)));
+ const UninstallJob * const target_job(visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(1)));
TEST_CHECK(target_job);
TEST_CHECK_EQUAL(join(target_job->requirements()->begin(), target_job->requirements()->end(), ", ", stringify_req),
"0 satisfied");
- const UninstallJob * const dep_job(simple_visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(2)));
+ const UninstallJob * const dep_job(visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(2)));
TEST_CHECK(dep_job);
TEST_CHECK_EQUAL(join(dep_job->requirements()->begin(), dep_job->requirements()->end(), ", ", stringify_req),
"1 satisfied");
- const UninstallJob * const dep_of_dep_job(simple_visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(3)));
+ const UninstallJob * const dep_of_dep_job(visitor_cast<const UninstallJob>(**resolved->job_lists()->execute_job_list()->fetch(3)));
TEST_CHECK(dep_of_dep_job);
TEST_CHECK_EQUAL(join(dep_of_dep_job->requirements()->begin(), dep_of_dep_job->requirements()->end(), ", ", stringify_req),
"2 satisfied");
diff --git a/paludis/resolver/resolver_TEST_fetches.cc b/paludis/resolver/resolver_TEST_fetches.cc
index 2b517a5..5693aa0 100644
--- a/paludis/resolver/resolver_TEST_fetches.cc
+++ b/paludis/resolver/resolver_TEST_fetches.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -38,7 +38,7 @@
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/tribool.hh>
#include <paludis/util/make_shared_copy.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/repository_factory.hh>
#include <paludis/package_database.hh>
@@ -111,22 +111,22 @@ namespace test_cases
TEST_CHECK_EQUAL(resolved->job_lists()->execute_job_list()->length(), 4);
- const FetchJob * const fetch_fetch_dep_job(simple_visitor_cast<const FetchJob>(**resolved->job_lists()->execute_job_list()->fetch(0)));
+ const FetchJob * const fetch_fetch_dep_job(visitor_cast<const FetchJob>(**resolved->job_lists()->execute_job_list()->fetch(0)));
TEST_CHECK(fetch_fetch_dep_job);
TEST_CHECK_EQUAL(join(fetch_fetch_dep_job->requirements()->begin(), fetch_fetch_dep_job->requirements()->end(), ", ", stringify_req),
"");
- const InstallJob * const fetch_dep_job(simple_visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(1)));
+ const InstallJob * const fetch_dep_job(visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(1)));
TEST_CHECK(fetch_dep_job);
TEST_CHECK_EQUAL(join(fetch_dep_job->requirements()->begin(), fetch_dep_job->requirements()->end(), ", ", stringify_req),
"0 satisfied independent always");
- const FetchJob * const fetch_target_job(simple_visitor_cast<const FetchJob>(**resolved->job_lists()->execute_job_list()->fetch(2)));
+ const FetchJob * const fetch_target_job(visitor_cast<const FetchJob>(**resolved->job_lists()->execute_job_list()->fetch(2)));
TEST_CHECK(fetch_target_job);
TEST_CHECK_EQUAL(join(fetch_target_job->requirements()->begin(), fetch_target_job->requirements()->end(), ", ", stringify_req),
"1 satisfied, 1 independent");
- const InstallJob * const target_job(simple_visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(3)));
+ const InstallJob * const target_job(visitor_cast<const InstallJob>(**resolved->job_lists()->execute_job_list()->fetch(3)));
TEST_CHECK(target_job);
TEST_CHECK_EQUAL(join(target_job->requirements()->begin(), target_job->requirements()->end(), ", ", stringify_req),
"2 satisfied independent always, 1 independent");
diff --git a/paludis/resolver/resolver_TEST_uninstalls.cc b/paludis/resolver/resolver_TEST_uninstalls.cc
index 8369b46..7bbdc14 100644
--- a/paludis/resolver/resolver_TEST_uninstalls.cc
+++ b/paludis/resolver/resolver_TEST_uninstalls.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -34,7 +34,7 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/make_shared_copy.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/return_literal_function.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/repository_factory.hh>
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index d6811f7..b4f410a 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -37,7 +37,7 @@
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/set-impl.hh>
#include <paludis/util/tribool.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/repository_factory.hh>
#include <paludis/package_database.hh>
@@ -387,7 +387,7 @@ ResolverTestCase::DecisionChecks::check_change(const QualifiedPackageName & q, c
if (! d)
return false;
- return simple_visitor_cast<const ChangesToMakeDecision>(*d) && d->resolvent().package() == q;
+ return visitor_cast<const ChangesToMakeDecision>(*d) && d->resolvent().package() == q;
}
bool
@@ -396,7 +396,7 @@ ResolverTestCase::DecisionChecks::check_change_slot(const QualifiedPackageName &
if (! d)
return false;
- return simple_visitor_cast<const ChangesToMakeDecision>(*d) && d->resolvent().package() == q &&
+ return visitor_cast<const ChangesToMakeDecision>(*d) && d->resolvent().package() == q &&
d->resolvent().slot().name_or_null() && *d->resolvent().slot().name_or_null() == s;
}
@@ -406,7 +406,7 @@ ResolverTestCase::DecisionChecks::check_breaking(const QualifiedPackageName & q,
if (! d)
return false;
- return simple_visitor_cast<const BreakDecision>(*d) && d->resolvent().package() == q;
+ return visitor_cast<const BreakDecision>(*d) && d->resolvent().package() == q;
}
bool
@@ -415,7 +415,7 @@ ResolverTestCase::DecisionChecks::check_remove(const QualifiedPackageName & q, c
if (! d)
return false;
- return simple_visitor_cast<const RemoveDecision>(*d) && d->resolvent().package() == q;
+ return visitor_cast<const RemoveDecision>(*d) && d->resolvent().package() == q;
}
bool
@@ -424,7 +424,7 @@ ResolverTestCase::DecisionChecks::check_unable(const QualifiedPackageName & q, c
if (! d)
return false;
- return simple_visitor_cast<const UnableToMakeDecision>(*d) && d->resolvent().package() == q;
+ return visitor_cast<const UnableToMakeDecision>(*d) && d->resolvent().package() == q;
}
std::string
diff --git a/paludis/slot_requirement.hh b/paludis/slot_requirement.hh
index e4f678d..d1c3293 100644
--- a/paludis/slot_requirement.hh
+++ b/paludis/slot_requirement.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 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
@@ -22,7 +22,7 @@
#include <paludis/slot_requirement-fwd.hh>
#include <paludis/name-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
namespace paludis
diff --git a/paludis/spec_tree.hh b/paludis/spec_tree.hh
index 37b0996..719503b 100644
--- a/paludis/spec_tree.hh
+++ b/paludis/spec_tree.hh
@@ -22,7 +22,7 @@
#include <paludis/spec_tree-fwd.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/sequence.hh>
#include <type_traits>
diff --git a/paludis/util/elf_dynamic_section.hh b/paludis/util/elf_dynamic_section.hh
index 6ba87f1..af01f6c 100644
--- a/paludis/util/elf_dynamic_section.hh
+++ b/paludis/util/elf_dynamic_section.hh
@@ -26,7 +26,7 @@
#include <paludis/util/singleton.hh>
#include <paludis/util/pimp.hh>
#include <paludis/util/wrapped_forward_iterator-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
#include <memory>
#include <string>
diff --git a/paludis/util/elf_sections.hh b/paludis/util/elf_sections.hh
index 5095d23..3569e81 100644
--- a/paludis/util/elf_sections.hh
+++ b/paludis/util/elf_sections.hh
@@ -23,7 +23,7 @@
#include <string>
#include <iosfwd>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
#include <paludis/util/type_list.hh>
namespace paludis
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index ea16e2b..4f4e823 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -76,8 +76,6 @@ add(`set', `hh', `fwd', `impl', `cc')
add(`sha1', `hh', `cc', `test')
add(`sha256', `hh', `cc', `test')
add(`simple_parser', `hh', `cc', `test', `fwd')
-add(`simple_visitor', `hh', `cc', `fwd', `impl')
-add(`simple_visitor_cast', `hh', `cc', `fwd')
add(`singleton', `hh', `impl', `test')
add(`stringify', `hh', `test')
add(`string_list_stream', `hh', `cc', `fwd', `test')
@@ -92,6 +90,8 @@ add(`tokeniser', `hh', `cc', `test')
add(`tribool', `hh', `cc', `fwd', `test')
add(`type_list', `hh', `cc', `fwd')
add(`util', `hh')
+add(`visitor', `hh', `cc', `fwd', `impl')
+add(`visitor_cast', `hh', `cc', `fwd')
add(`wildcard_expander', `hh', `cc', `test', `testscript')
add(`wrapped_forward_iterator', `hh', `fwd', `impl', `test')
add(`wrapped_output_iterator', `hh', `fwd', `impl')
diff --git a/paludis/util/simple_visitor-fwd.hh b/paludis/util/visitor-fwd.hh
index ce75ea8..60313de 100644
--- a/paludis/util/simple_visitor-fwd.hh
+++ b/paludis/util/visitor-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 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
@@ -17,8 +17,8 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_FWD_HH
-#define PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_FWD_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_FWD_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_FWD_HH 1
#include <paludis/util/type_list-fwd.hh>
diff --git a/paludis/util/simple_visitor-impl.hh b/paludis/util/visitor-impl.hh
index 4418e33..3d7381e 100644
--- a/paludis/util/simple_visitor-impl.hh
+++ b/paludis/util/visitor-impl.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 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
@@ -17,10 +17,10 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_IMPL_HH
-#define PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_IMPL_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_IMPL_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_IMPL_HH 1
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor.hh>
namespace paludis
{
diff --git a/paludis/util/simple_visitor.cc b/paludis/util/visitor.cc
index 0c84576..c990a75 100644
--- a/paludis/util/simple_visitor.cc
+++ b/paludis/util/visitor.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 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
@@ -17,5 +17,5 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/util/simple_visitor-impl.hh>
+#include <paludis/util/visitor-impl.hh>
diff --git a/paludis/util/simple_visitor.hh b/paludis/util/visitor.hh
index 8c3877e..b88ae4f 100644
--- a/paludis/util/simple_visitor.hh
+++ b/paludis/util/visitor.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010, 2011 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
@@ -17,10 +17,10 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_HH
-#define PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_HH 1
-#include <paludis/util/simple_visitor-fwd.hh>
+#include <paludis/util/visitor-fwd.hh>
#include <paludis/util/no_type.hh>
namespace paludis
diff --git a/paludis/util/simple_visitor_cast-fwd.hh b/paludis/util/visitor_cast-fwd.hh
index 7482c9b..5fdfa29 100644
--- a/paludis/util/simple_visitor_cast-fwd.hh
+++ b/paludis/util/visitor_cast-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2011 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
@@ -17,15 +17,15 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_CAST_FWD_HH
-#define PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_CAST_FWD_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_CAST_FWD_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_CAST_FWD_HH 1
#include <paludis/util/attributes.hh>
namespace paludis
{
template <typename To_, typename From_>
- To_ * simple_visitor_cast(From_ &) PALUDIS_ATTRIBUTE((warn_unused_result));
+ To_ * visitor_cast(From_ &) PALUDIS_ATTRIBUTE((warn_unused_result));
}
#endif
diff --git a/paludis/util/simple_visitor_cast.cc b/paludis/util/visitor_cast.cc
index 641abf8..320bbca 100644
--- a/paludis/util/simple_visitor_cast.cc
+++ b/paludis/util/visitor_cast.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 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
@@ -17,7 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
using namespace paludis;
diff --git a/paludis/util/simple_visitor_cast.hh b/paludis/util/visitor_cast.hh
index 9b1370b..568de2d 100644
--- a/paludis/util/simple_visitor_cast.hh
+++ b/paludis/util/visitor_cast.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010, 2011 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
@@ -17,17 +17,17 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_CAST_HH
-#define PALUDIS_GUARD_PALUDIS_UTIL_SIMPLE_VISITOR_CAST_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_CAST_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_CAST_HH 1
-#include <paludis/util/simple_visitor_cast-fwd.hh>
-#include <paludis/util/simple_visitor.hh>
+#include <paludis/util/visitor_cast-fwd.hh>
+#include <paludis/util/visitor.hh>
#include <type_traits>
namespace paludis
{
template <typename To_, typename From_>
- struct SimpleVisitorCaster
+ struct VisitorCaster
{
To_ * visit(To_ & t)
{
@@ -41,12 +41,12 @@ namespace paludis
};
template <typename To_, typename From_, bool ok_>
- struct VerifySimpleVisitorCastType
+ struct VerifyVisitorCastType
{
};
template <typename To_, typename From_>
- struct VerifySimpleVisitorCastType<To_, From_, true>
+ struct VerifyVisitorCastType<To_, From_, true>
{
typedef int IsOK;
};
@@ -64,13 +64,13 @@ namespace paludis
};
template <typename To_, typename From_>
- To_ * simple_visitor_cast(From_ & from)
+ To_ * visitor_cast(From_ & from)
{
- /* verify that we are attempting to simple_visitor_cast something that
+ /* verify that we are attempting to visitor_cast something that
* could potentially be true */
- typedef typename VerifySimpleVisitorCastType<To_, From_, std::is_base_of<From_, To_>::value>::IsOK TypeIsOK;
+ typedef typename VerifyVisitorCastType<To_, From_, std::is_base_of<From_, To_>::value>::IsOK TypeIsOK;
- SimpleVisitorCaster<To_, typename CopyConst<From_, typename From_::VisitableBaseClass>::Type> q;
+ VisitorCaster<To_, typename CopyConst<From_, typename From_::VisitableBaseClass>::Type> q;
return from.template accept_returning<To_ *>(q);
}
}
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index 8745212..aeca66b 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2007, 2008 Richard Brown
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 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
@@ -25,7 +25,7 @@
#include <paludis/mask.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/timestamp.hh>
#include <ruby.h>
@@ -608,7 +608,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- const MetadataSpecTreeKey<DependencySpecTree> * real_self(simple_visitor_cast<
+ const MetadataSpecTreeKey<DependencySpecTree> * real_self(visitor_cast<
const MetadataSpecTreeKey<DependencySpecTree> >(**self_ptr));
VALUE result(rb_ary_new());
diff --git a/src/clients/cave/cmd_digest.cc b/src/clients/cave/cmd_digest.cc
index aadfe2f..bfa0ac9 100644
--- a/src/clients/cave/cmd_digest.cc
+++ b/src/clients/cave/cmd_digest.cc
@@ -26,7 +26,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index b5a60f5..2a60e5b 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -37,7 +37,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/log.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/make_null_shared_ptr.hh>
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 49e08fa..49b5a4b 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -35,8 +35,8 @@
#include <paludis/util/join.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
-#include <paludis/util/simple_visitor_cast.hh>
-#include <paludis/util/simple_visitor-impl.hh>
+#include <paludis/util/visitor_cast.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/hashes.hh>
@@ -169,7 +169,7 @@ namespace
{
bool operator() (const std::shared_ptr<const ExecuteJob> & job) const
{
- return (! job->state()) || ! simple_visitor_cast<const JobSucceededState>(*job->state());
+ return (! job->state()) || ! visitor_cast<const JobSucceededState>(*job->state());
}
};
@@ -1307,7 +1307,7 @@ namespace
std::string queue_name() const
{
if (0 != n_fetch_jobs)
- return simple_visitor_cast<const FetchJob>(*job) ? "fetch" : "execute";
+ return visitor_cast<const FetchJob>(*job) ? "fetch" : "execute";
else
return "execute";
}
@@ -1364,7 +1364,7 @@ namespace
}
if (want && cmdline.execution_options.a_fetch.specified())
- want = simple_visitor_cast<const FetchJob>(*job);
+ want = visitor_cast<const FetchJob>(*job);
int current_global_retcode;
{
@@ -1687,7 +1687,7 @@ namespace
void visit(const JobSucceededState & s) const
{
if ((s.output_manager() && s.output_manager()->want_to_flush())
- || (something_failed && ! simple_visitor_cast<const FetchJob>(*job)))
+ || (something_failed && ! visitor_cast<const FetchJob>(*job)))
{
need_heading();
cout << fuc(fs_summary_job_succeeded(), fv<'s'>(job->accept_returning<std::string>(SummaryNameVisitor(env))));
@@ -1702,7 +1702,7 @@ namespace
void visit(const JobSkippedState &) const
{
- if (! simple_visitor_cast<const FetchJob>(*job))
+ if (! visitor_cast<const FetchJob>(*job))
{
need_heading();
cout << fuc(fs_summary_job_skipped(), fv<'s'>(job->accept_returning<std::string>(SummaryNameVisitor(env))));
diff --git a/src/clients/cave/cmd_find_candidates.cc b/src/clients/cave/cmd_find_candidates.cc
index e5e0057..1cd4a17 100644
--- a/src/clients/cave/cmd_find_candidates.cc
+++ b/src/clients/cave/cmd_find_candidates.cc
@@ -42,7 +42,7 @@
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <cstdlib>
diff --git a/src/clients/cave/cmd_generate_metadata.cc b/src/clients/cave/cmd_generate_metadata.cc
index 31d1cf5..5e64242 100644
--- a/src/clients/cave/cmd_generate_metadata.cc
+++ b/src/clients/cave/cmd_generate_metadata.cc
@@ -28,7 +28,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/thread_pool.hh>
diff --git a/src/clients/cave/cmd_has_version.cc b/src/clients/cave/cmd_has_version.cc
index b96bed0..af90689 100644
--- a/src/clients/cave/cmd_has_version.cc
+++ b/src/clients/cave/cmd_has_version.cc
@@ -27,7 +27,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/generator.hh>
diff --git a/src/clients/cave/cmd_info.cc b/src/clients/cave/cmd_info.cc
index 09261bd..a106add 100644
--- a/src/clients/cave/cmd_info.cc
+++ b/src/clients/cave/cmd_info.cc
@@ -40,7 +40,7 @@
#include <paludis/metadata_key.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/timestamp.hh>
#include <paludis/util/make_null_shared_ptr.hh>
@@ -92,8 +92,8 @@ namespace
{
bool operator() (const std::shared_ptr<const MetadataKey> & a, const std::shared_ptr<const MetadataKey> & b) const
{
- bool a_is_section(simple_visitor_cast<const MetadataSectionKey>(*a));
- bool b_is_section(simple_visitor_cast<const MetadataSectionKey>(*b));
+ bool a_is_section(visitor_cast<const MetadataSectionKey>(*a));
+ bool b_is_section(visitor_cast<const MetadataSectionKey>(*b));
if (a_is_section != b_is_section)
return b_is_section;
if (a->type() != b->type())
diff --git a/src/clients/cave/cmd_manage_search_index.cc b/src/clients/cave/cmd_manage_search_index.cc
index c485448..e95aea2 100644
--- a/src/clients/cave/cmd_manage_search_index.cc
+++ b/src/clients/cave/cmd_manage_search_index.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -45,7 +45,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/mutex.hh>
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 18b18fc..c4e2723 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -29,7 +29,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/singleton-impl.hh>
#include <paludis/util/accept_visitor.hh>
diff --git a/src/clients/cave/cmd_mirror.cc b/src/clients/cave/cmd_mirror.cc
index 784bbe0..c945aa1 100644
--- a/src/clients/cave/cmd_mirror.cc
+++ b/src/clients/cave/cmd_mirror.cc
@@ -27,7 +27,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_named_values.hh>
diff --git a/src/clients/cave/cmd_print_best_version.cc b/src/clients/cave/cmd_print_best_version.cc
index e39489c..26ee18f 100644
--- a/src/clients/cave/cmd_print_best_version.cc
+++ b/src/clients/cave/cmd_print_best_version.cc
@@ -27,7 +27,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/generator.hh>
diff --git a/src/clients/cave/cmd_print_environment_metadata.cc b/src/clients/cave/cmd_print_environment_metadata.cc
index deab367..8c37077 100644
--- a/src/clients/cave/cmd_print_environment_metadata.cc
+++ b/src/clients/cave/cmd_print_environment_metadata.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010, 2011 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
@@ -22,7 +22,7 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/environment.hh>
#include <paludis/metadata_key.hh>
@@ -101,7 +101,7 @@ namespace
cout << format_plain_metadata_key(k, name_prefix, cmdline.a_format.argument());
} while (false);
- const MetadataSectionKey * section(simple_visitor_cast<const MetadataSectionKey>(*k));
+ const MetadataSectionKey * section(visitor_cast<const MetadataSectionKey>(*k));
if (section)
{
for (MetadataSectionKey::MetadataConstIterator s(section->begin_metadata()), s_end(section->end_metadata()) ;
diff --git a/src/clients/cave/cmd_print_id_masks.cc b/src/clients/cave/cmd_print_id_masks.cc
index 9664c11..b81be8b 100644
--- a/src/clients/cave/cmd_print_id_masks.cc
+++ b/src/clients/cave/cmd_print_id_masks.cc
@@ -23,7 +23,7 @@
#include "format_string.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
diff --git a/src/clients/cave/cmd_print_id_metadata.cc b/src/clients/cave/cmd_print_id_metadata.cc
index 9607425..2b3b78e 100644
--- a/src/clients/cave/cmd_print_id_metadata.cc
+++ b/src/clients/cave/cmd_print_id_metadata.cc
@@ -22,7 +22,7 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
@@ -121,7 +121,7 @@ namespace
cout << format_plain_metadata_key(k, name_prefix, cmdline.a_format.argument());
} while (false);
- const MetadataSectionKey * section(simple_visitor_cast<const MetadataSectionKey>(*k));
+ const MetadataSectionKey * section(visitor_cast<const MetadataSectionKey>(*k));
if (section)
{
for (MetadataSectionKey::MetadataConstIterator s(section->begin_metadata()), s_end(section->end_metadata()) ;
diff --git a/src/clients/cave/cmd_print_ids.cc b/src/clients/cave/cmd_print_ids.cc
index daa5d08..e987d8e 100644
--- a/src/clients/cave/cmd_print_ids.cc
+++ b/src/clients/cave/cmd_print_ids.cc
@@ -28,7 +28,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/generator.hh>
@@ -182,7 +182,7 @@ namespace
{
for (PackageID::MasksConstIterator m((*i)->begin_masks()), m_end((*i)->end_masks()) ;
m != m_end ; ++m)
- if (simple_visitor_cast<const UserMask>(**m))
+ if (visitor_cast<const UserMask>(**m))
{
result->insert(*i);
break;
@@ -192,7 +192,7 @@ namespace
{
for (PackageID::MasksConstIterator m((*i)->begin_masks()), m_end((*i)->end_masks()) ;
m != m_end ; ++m)
- if (simple_visitor_cast<const UnacceptedMask>(**m))
+ if (visitor_cast<const UnacceptedMask>(**m))
{
result->insert(*i);
break;
@@ -202,7 +202,7 @@ namespace
{
for (PackageID::MasksConstIterator m((*i)->begin_masks()), m_end((*i)->end_masks()) ;
m != m_end ; ++m)
- if (simple_visitor_cast<const RepositoryMask>(**m))
+ if (visitor_cast<const RepositoryMask>(**m))
{
result->insert(*i);
break;
@@ -212,7 +212,7 @@ namespace
{
for (PackageID::MasksConstIterator m((*i)->begin_masks()), m_end((*i)->end_masks()) ;
m != m_end ; ++m)
- if (simple_visitor_cast<const UnsupportedMask>(**m))
+ if (visitor_cast<const UnsupportedMask>(**m))
{
result->insert(*i);
break;
@@ -222,7 +222,7 @@ namespace
{
for (PackageID::MasksConstIterator m((*i)->begin_masks()), m_end((*i)->end_masks()) ;
m != m_end ; ++m)
- if (simple_visitor_cast<const AssociationMask>(**m))
+ if (visitor_cast<const AssociationMask>(**m))
{
result->insert(*i);
break;
diff --git a/src/clients/cave/cmd_print_repository_metadata.cc b/src/clients/cave/cmd_print_repository_metadata.cc
index 3796ef9..2a5aa24 100644
--- a/src/clients/cave/cmd_print_repository_metadata.cc
+++ b/src/clients/cave/cmd_print_repository_metadata.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -22,7 +22,7 @@
#include "exceptions.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
@@ -104,7 +104,7 @@ namespace
cout << format_plain_metadata_key(k, name_prefix, cmdline.a_format.argument());
} while (false);
- const MetadataSectionKey * section(simple_visitor_cast<const MetadataSectionKey>(*k));
+ const MetadataSectionKey * section(visitor_cast<const MetadataSectionKey>(*k));
if (section)
{
for (MetadataSectionKey::MetadataConstIterator s(section->begin_metadata()), s_end(section->end_metadata()) ;
diff --git a/src/clients/cave/cmd_print_set.cc b/src/clients/cave/cmd_print_set.cc
index 6b2bafc..eca3131 100644
--- a/src/clients/cave/cmd_print_set.cc
+++ b/src/clients/cave/cmd_print_set.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -30,7 +30,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/map.hh>
#include <paludis/util/accept_visitor.hh>
#include <cstdlib>
diff --git a/src/clients/cave/cmd_print_spec.cc b/src/clients/cave/cmd_print_spec.cc
index 8add403..2c7a2c4 100644
--- a/src/clients/cave/cmd_print_spec.cc
+++ b/src/clients/cave/cmd_print_spec.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -22,7 +22,7 @@
#include "format_string.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/options.hh>
diff --git a/src/clients/cave/cmd_print_unused_distfiles.cc b/src/clients/cave/cmd_print_unused_distfiles.cc
index 6a77ea9..59c1552 100644
--- a/src/clients/cave/cmd_print_unused_distfiles.cc
+++ b/src/clients/cave/cmd_print_unused_distfiles.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2010 Stephan Friedrichs
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -40,7 +40,7 @@
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <iostream>
@@ -198,7 +198,7 @@ PrintUnusedDistfilesCommand::run(
auto distdir_metadata((*repo)->find_metadata("distdir"));
if (distdir_metadata != (*repo)->end_metadata())
{
- auto path_key(simple_visitor_cast<const MetadataValueKey<FSPath>>(**distdir_metadata));
+ auto path_key(visitor_cast<const MetadataValueKey<FSPath>>(**distdir_metadata));
if (path_key)
distdirs.insert(path_key->value().realpath());
}
diff --git a/src/clients/cave/cmd_report.cc b/src/clients/cave/cmd_report.cc
index 1a0d399..511dabf 100644
--- a/src/clients/cave/cmd_report.cc
+++ b/src/clients/cave/cmd_report.cc
@@ -45,7 +45,7 @@
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/accept_visitor.hh>
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index 99b7137..47e44b5 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -40,7 +40,7 @@
#include <paludis/metadata_key.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/pretty_print.hh>
#include <paludis/util/timestamp.hh>
@@ -253,8 +253,8 @@ namespace
{
bool operator() (const std::shared_ptr<const MetadataKey> & a, const std::shared_ptr<const MetadataKey> & b) const
{
- bool a_is_section(simple_visitor_cast<const MetadataSectionKey>(*a));
- bool b_is_section(simple_visitor_cast<const MetadataSectionKey>(*b));
+ bool a_is_section(visitor_cast<const MetadataSectionKey>(*a));
+ bool b_is_section(visitor_cast<const MetadataSectionKey>(*b));
if (a_is_section != b_is_section)
return b_is_section;
if (a->type() != b->type())
diff --git a/src/clients/cave/cmd_verify.cc b/src/clients/cave/cmd_verify.cc
index 87d013f..4d22004 100644
--- a/src/clients/cave/cmd_verify.cc
+++ b/src/clients/cave/cmd_verify.cc
@@ -30,7 +30,7 @@
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/safe_ifstream.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/md5.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/make_null_shared_ptr.hh>
@@ -121,7 +121,7 @@ namespace
ContentsEntry::MetadataConstIterator k(e.find_metadata("mtime"));
if (e.end_metadata() != k)
{
- const MetadataTimeKey * kk(simple_visitor_cast<const MetadataTimeKey>(**k));
+ const MetadataTimeKey * kk(visitor_cast<const MetadataTimeKey>(**k));
if (kk && (kk->value().seconds() != f.mtim().seconds()))
{
message(p, "Modification time changed");
@@ -137,7 +137,7 @@ namespace
ContentsEntry::MetadataConstIterator k(e.find_metadata("md5"));
if (e.end_metadata() != k)
{
- const MetadataValueKey<std::string> * kk(simple_visitor_cast<const MetadataValueKey<std::string> >(**k));
+ const MetadataValueKey<std::string> * kk(visitor_cast<const MetadataValueKey<std::string> >(**k));
if (kk)
{
SafeIFStream s(f);
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 747305b..a42a369 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -39,7 +39,7 @@
#include <paludis/util/timestamp.hh>
#include <paludis/util/map.hh>
#include <paludis/util/make_shared_copy.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/sequence-impl.hh>
#include <paludis/util/set-impl.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
@@ -621,11 +621,11 @@ namespace
std::shared_ptr<const QualifiedPackageName> name_if_dependent_remove(
const std::shared_ptr<const Resolution> & resolution)
{
- const RemoveDecision * const remove_decision(simple_visitor_cast<const RemoveDecision>(*resolution->decision()));
+ const RemoveDecision * const remove_decision(visitor_cast<const RemoveDecision>(*resolution->decision()));
if (remove_decision)
for (auto r(resolution->constraints()->begin()), r_end(resolution->constraints()->end()) ;
r != r_end ; ++r)
- if (simple_visitor_cast<const DependentReason>(*(*r)->reason()))
+ if (visitor_cast<const DependentReason>(*(*r)->reason()))
return make_shared_copy((*remove_decision->ids()->begin())->name());
return make_null_shared_ptr();
}
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 7b4d162..387a408 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 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
@@ -32,7 +32,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
-#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/set.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/mutex.hh>
@@ -218,14 +218,14 @@ namespace
continue;
}
- if (! simple_visitor_cast<const MetadataValueKey<std::string> >(**eapi_i))
+ if (! visitor_cast<const MetadataValueKey<std::string> >(**eapi_i))
{
Lock lock(mutex);
results.insert(std::make_pair(id, "EAPI metadata key is not a string key"));
continue;
}
- if (simple_visitor_cast<const MetadataValueKey<std::string> >(**eapi_i)->value() == "UNKNOWN")
+ if (visitor_cast<const MetadataValueKey<std::string> >(**eapi_i)->value() == "UNKNOWN")
{
Lock lock(mutex);
results.insert(std::make_pair(id, "EAPI is 'UNKNOWN'"));