aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-25 14:12:53 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-25 14:12:53 +0000
commit8aca0f10d1934e4d0170df3eea4c6ab1428a7027 (patch)
tree7de5bf5b57ac07ef107e1e86f365334b8839707b
parentfa16225ca76ef2bf07174aee6460264c63f2b104 (diff)
downloadpaludis-8aca0f10d1934e4d0170df3eea4c6ab1428a7027.tar.gz
paludis-8aca0f10d1934e4d0170df3eea4c6ab1428a7027.tar.xz
Rename const iterators to ConstIterator, mutable to Iterator. Fixes: ticket:365
-rw-r--r--paludis/action.cc30
-rw-r--r--paludis/action.hh20
-rw-r--r--paludis/args/args_dumper.cc4
-rw-r--r--paludis/args/args_group.cc8
-rw-r--r--paludis/args/args_group.hh6
-rw-r--r--paludis/args/args_handler.cc32
-rw-r--r--paludis/args/args_handler.hh24
-rw-r--r--paludis/args/args_option.cc24
-rw-r--r--paludis/args/args_option.hh32
-rw-r--r--paludis/args/args_visitor.cc18
-rw-r--r--paludis/args/args_visitor.hh2
-rw-r--r--paludis/args/man.cc12
-rw-r--r--paludis/config_file.cc34
-rw-r--r--paludis/config_file.hh18
-rw-r--r--paludis/contents.cc8
-rw-r--r--paludis/contents.hh6
-rw-r--r--paludis/dep_list/dep_list.cc22
-rw-r--r--paludis/dep_list/dep_list_TEST.cc2
-rw-r--r--paludis/dep_list/exceptions.cc2
-rw-r--r--paludis/dep_list/override_functions.cc4
-rw-r--r--paludis/dep_list/range_rewriter.cc2
-rw-r--r--paludis/dep_list/show_suggest_visitor.cc2
-rw-r--r--paludis/dep_list/uninstall_list.cc30
-rw-r--r--paludis/dep_list/uninstall_list.hh6
-rw-r--r--paludis/dep_list/uninstall_list_TEST.cc4
-rw-r--r--paludis/dep_spec.cc26
-rw-r--r--paludis/dep_spec.hh14
-rw-r--r--paludis/dep_spec_flattener.cc8
-rw-r--r--paludis/dep_spec_flattener.hh6
-rw-r--r--paludis/environment_implementation.cc4
-rw-r--r--paludis/environments/no_config/no_config_environment.cc4
-rw-r--r--paludis/environments/paludis/keywords_conf.cc2
-rw-r--r--paludis/environments/paludis/licenses_conf.cc2
-rw-r--r--paludis/environments/paludis/mirrors_conf.cc2
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc2
-rw-r--r--paludis/environments/paludis/paludis_config.cc8
-rw-r--r--paludis/environments/paludis/paludis_config.hh6
-rw-r--r--paludis/environments/paludis/paludis_environment.cc4
-rw-r--r--paludis/environments/paludis/use_conf.cc4
-rw-r--r--paludis/environments/portage/portage_environment.cc10
-rw-r--r--paludis/environments/test/test_environment.cc2
-rw-r--r--paludis/hook.cc8
-rw-r--r--paludis/hook.hh6
-rw-r--r--paludis/hooker.cc10
-rw-r--r--paludis/match_package.cc6
-rw-r--r--paludis/package_database.cc48
-rw-r--r--paludis/package_database.hh12
-rw-r--r--paludis/package_id.cc20
-rw-r--r--paludis/package_id.hh14
-rw-r--r--paludis/python_hooks.cc4
-rw-r--r--paludis/query.cc28
-rw-r--r--paludis/repositories/cran/cran_repository.cc2
-rw-r--r--paludis/repositories/e/aa_visitor.cc8
-rw-r--r--paludis/repositories/e/aa_visitor.hh8
-rw-r--r--paludis/repositories/e/check_fetched_files_visitor.cc2
-rw-r--r--paludis/repositories/e/dep_lexer.cc8
-rw-r--r--paludis/repositories/e/dep_lexer.hh6
-rw-r--r--paludis/repositories/e/dep_lexer_TEST.cc12
-rw-r--r--paludis/repositories/e/dep_parser.cc4
-rw-r--r--paludis/repositories/e/e_key.cc14
-rw-r--r--paludis/repositories/e/e_repository.cc60
-rw-r--r--paludis/repositories/e/e_repository.hh12
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc4
-rw-r--r--paludis/repositories/e/e_repository_mask_file.cc10
-rw-r--r--paludis/repositories/e/e_repository_mask_file.hh7
-rw-r--r--paludis/repositories/e/e_repository_news.cc34
-rw-r--r--paludis/repositories/e/e_repository_news.hh36
-rw-r--r--paludis/repositories/e/e_repository_profile.cc46
-rw-r--r--paludis/repositories/e/e_repository_profile.hh18
-rw-r--r--paludis/repositories/e/e_repository_profile_file.cc14
-rw-r--r--paludis/repositories/e/e_repository_profile_file.hh6
-rw-r--r--paludis/repositories/e/e_repository_sets.cc10
-rw-r--r--paludis/repositories/e/eapi_phase.cc16
-rw-r--r--paludis/repositories/e/eapi_phase.hh12
-rw-r--r--paludis/repositories/e/ebuild.cc10
-rw-r--r--paludis/repositories/e/ebuild_entries.cc38
-rw-r--r--paludis/repositories/e/eclass_mtimes.cc2
-rw-r--r--paludis/repositories/e/exheres_layout.cc4
-rw-r--r--paludis/repositories/e/fetch_visitor.cc4
-rw-r--r--paludis/repositories/e/glsa.cc32
-rw-r--r--paludis/repositories/e/glsa.hh22
-rw-r--r--paludis/repositories/e/manifest2_reader.cc12
-rw-r--r--paludis/repositories/e/manifest2_reader.hh12
-rw-r--r--paludis/repositories/e/qa/qa_checks_group.cc8
-rw-r--r--paludis/repositories/e/qa/qa_checks_group.hh6
-rw-r--r--paludis/repositories/e/qa/visibility.cc10
-rw-r--r--paludis/repositories/e/source_uri_finder.cc18
-rw-r--r--paludis/repositories/e/source_uri_finder.hh6
-rw-r--r--paludis/repositories/e/source_uri_finder_TEST.cc4
-rw-r--r--paludis/repositories/e/traditional_layout.cc4
-rw-r--r--paludis/repositories/e/use_desc.cc2
-rw-r--r--paludis/repositories/e/vdb_repository.cc20
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc8
-rw-r--r--paludis/repositories/fake/fake_package_id.cc8
-rw-r--r--paludis/repositories/fake/fake_repository.cc8
-rw-r--r--paludis/repositories/fake/fake_repository.hh4
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc4
-rw-r--r--paludis/repositories/gems/gem_specification.cc12
-rw-r--r--paludis/repositories/gems/gem_specifications.cc14
-rw-r--r--paludis/repositories/gems/gem_specifications.hh6
-rw-r--r--paludis/repositories/gems/gems_repository.cc4
-rw-r--r--paludis/repositories/gems/yaml.cc18
-rw-r--r--paludis/repositories/gems/yaml.hh14
-rw-r--r--paludis/repositories/gems/yaml_TEST.cc4
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc4
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc12
-rw-r--r--paludis/repository.cc4
-rw-r--r--paludis/repository.hh16
-rw-r--r--paludis/repository_info.cc18
-rw-r--r--paludis/repository_info.hh14
-rw-r--r--paludis/repository_name_cache.cc4
-rw-r--r--paludis/set_file.cc6
-rw-r--r--paludis/syncer.cc2
-rw-r--r--paludis/tasks/find_unused_packages_task.cc4
-rw-r--r--paludis/tasks/install_task.cc18
-rw-r--r--paludis/tasks/install_task.hh6
-rw-r--r--paludis/tasks/report_task.cc14
-rw-r--r--paludis/tasks/stage_builder_task.cc8
-rw-r--r--paludis/tasks/stage_builder_task.hh6
-rw-r--r--paludis/tasks/sync_task.cc10
-rw-r--r--paludis/tasks/sync_task.hh6
-rw-r--r--paludis/tasks/uninstall_task.cc28
-rw-r--r--paludis/tasks/uninstall_task.hh6
-rw-r--r--paludis/util/graph-impl.hh50
-rw-r--r--paludis/util/graph.hh6
-rw-r--r--paludis/util/map-impl.hh14
-rw-r--r--paludis/util/map.hh10
-rw-r--r--paludis/util/pstream.cc4
-rw-r--r--paludis/util/sequence-impl.hh20
-rw-r--r--paludis/util/sequence.hh16
-rw-r--r--paludis/util/set-impl.hh12
-rw-r--r--paludis/util/set.hh8
-rw-r--r--paludis/util/system.cc12
-rw-r--r--paludis/util/system.hh6
-rw-r--r--paludis/util/visitor-fwd.hh16
-rw-r--r--paludis/util/visitor-impl.hh78
-rw-r--r--paludis/util/visitor.hh100
-rw-r--r--paludis/util/visitor_TEST.cc2
-rw-r--r--python/dep_spec.cc20
-rw-r--r--python/dep_spec.hh6
-rw-r--r--python/package_id.cc2
-rw-r--r--python/repository.cc2
-rw-r--r--ruby/contents.cc2
-rw-r--r--ruby/dep_spec.cc4
-rw-r--r--ruby/environment.cc2
-rw-r--r--ruby/find_unused_packages_task.cc2
-rw-r--r--ruby/package_database.cc6
-rw-r--r--ruby/package_id.cc10
-rw-r--r--ruby/repository.cc24
-rw-r--r--src/clients/accerso/accerso.cc4
-rw-r--r--src/clients/adjutrix/display_default_system_resolution.cc8
-rw-r--r--src/clients/adjutrix/downgrade_check.cc10
-rw-r--r--src/clients/adjutrix/find_dropped_keywords.cc8
-rw-r--r--src/clients/adjutrix/find_insecure_packages.cc4
-rw-r--r--src/clients/adjutrix/find_reverse_deps.cc12
-rw-r--r--src/clients/adjutrix/find_stable_candidates.cc8
-rw-r--r--src/clients/adjutrix/find_unused_packages.cc8
-rw-r--r--src/clients/adjutrix/keywords_graph.cc12
-rw-r--r--src/clients/adjutrix/what_needs_keywording.cc8
-rw-r--r--src/clients/contrarius/install.cc2
-rw-r--r--src/clients/contrarius/stage_builder.cc2
-rw-r--r--src/clients/contrarius/target_config.cc2
-rw-r--r--src/clients/contrarius/target_config.hh2
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc6
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc2
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc6
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc4
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc4
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc4
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc6
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc4
-rw-r--r--src/clients/inquisitio/do_search.cc12
-rw-r--r--src/clients/instruo/instruo.cc6
-rw-r--r--src/clients/paludis/applets.cc12
-rw-r--r--src/clients/paludis/do_config.cc6
-rw-r--r--src/clients/paludis/do_contents.cc6
-rw-r--r--src/clients/paludis/info.cc12
-rw-r--r--src/clients/paludis/install.cc10
-rw-r--r--src/clients/paludis/list.cc22
-rw-r--r--src/clients/paludis/owner.cc10
-rw-r--r--src/clients/paludis/query.cc6
-rw-r--r--src/clients/paludis/report.cc2
-rw-r--r--src/clients/paludis/sync.cc2
-rw-r--r--src/clients/paludis/uninstall.cc6
-rw-r--r--src/clients/qualudis/qualudis.cc4
-rw-r--r--src/output/console_install_task.cc34
-rw-r--r--src/output/console_install_task.hh4
-rw-r--r--src/output/console_query_task.cc12
188 files changed, 1096 insertions, 1095 deletions
diff --git a/paludis/action.cc b/paludis/action.cc
index 876e473..e02b4e8 100644
--- a/paludis/action.cc
+++ b/paludis/action.cc
@@ -28,21 +28,21 @@ using namespace paludis;
#include <paludis/action-se.cc>
#include <paludis/action-sr.cc>
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, InstallAction>;
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, ConfigAction>;
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, InfoAction>;
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, PretendAction>;
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, InstalledAction>;
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, UninstallAction>;
-template class MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, FetchAction>;
-
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<InstallAction> >;
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<ConfigAction> >;
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<InfoAction> >;
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<PretendAction> >;
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<InstalledAction> >;
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<UninstallAction> >;
-template class MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<FetchAction> >;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, InstallAction>;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, ConfigAction>;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, InfoAction>;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, PretendAction>;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, InstalledAction>;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, UninstallAction>;
+template class AcceptInterfaceVisitsThis<ActionVisitorTypes, FetchAction>;
+
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<InstallAction> >;
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<ConfigAction> >;
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<InfoAction> >;
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<PretendAction> >;
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<InstalledAction> >;
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<UninstallAction> >;
+template class AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<FetchAction> >;
template class Sequence<FetchActionFailure>;
diff --git a/paludis/action.hh b/paludis/action.hh
index ec7a257..d126f1f 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -66,7 +66,7 @@ namespace paludis
};
class PALUDIS_VISIBLE Action :
- public virtual MutableAcceptInterface<ActionVisitorTypes>
+ public virtual AcceptInterface<ActionVisitorTypes>
{
public:
virtual ~Action() = 0;
@@ -75,7 +75,7 @@ namespace paludis
class PALUDIS_VISIBLE InstallAction :
public Action,
private PrivateImplementationPattern<InstallAction>,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, InstallAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, InstallAction>
{
public:
InstallAction(const InstallActionOptions &);
@@ -87,7 +87,7 @@ namespace paludis
class PALUDIS_VISIBLE FetchAction :
public Action,
private PrivateImplementationPattern<FetchAction>,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, FetchAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, FetchAction>
{
public:
FetchAction(const FetchActionOptions &);
@@ -99,7 +99,7 @@ namespace paludis
class PALUDIS_VISIBLE UninstallAction :
public Action,
private PrivateImplementationPattern<UninstallAction>,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, UninstallAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, UninstallAction>
{
public:
UninstallAction(const UninstallActionOptions &);
@@ -110,14 +110,14 @@ namespace paludis
class PALUDIS_VISIBLE InstalledAction :
public Action,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, InstalledAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, InstalledAction>
{
};
class PALUDIS_VISIBLE PretendAction :
public Action,
private PrivateImplementationPattern<PretendAction>,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, PretendAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, PretendAction>
{
public:
PretendAction();
@@ -129,18 +129,18 @@ namespace paludis
class PALUDIS_VISIBLE ConfigAction :
public Action,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, ConfigAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, ConfigAction>
{
};
class PALUDIS_VISIBLE InfoAction:
public Action,
- public MutableAcceptInterfaceVisitsThis<ActionVisitorTypes, InfoAction>
+ public AcceptInterfaceVisitsThis<ActionVisitorTypes, InfoAction>
{
};
class PALUDIS_VISIBLE SupportsActionTestBase :
- public virtual MutableAcceptInterface<SupportsActionTestVisitorTypes>
+ public virtual AcceptInterface<SupportsActionTestVisitorTypes>
{
public:
virtual ~SupportsActionTestBase() = 0;
@@ -149,7 +149,7 @@ namespace paludis
template <typename A_>
class PALUDIS_VISIBLE SupportsActionTest :
public SupportsActionTestBase,
- public MutableAcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<A_> >
+ public AcceptInterfaceVisitsThis<SupportsActionTestVisitorTypes, SupportsActionTest<A_> >
{
};
diff --git a/paludis/args/args_dumper.cc b/paludis/args/args_dumper.cc
index 66f9e50..f92059a 100644
--- a/paludis/args/args_dumper.cc
+++ b/paludis/args/args_dumper.cc
@@ -56,7 +56,7 @@ void ArgsDumper::visit(const StringSetArg & a)
generic_visit(a);
if (a.begin_allowed_args() != a.end_allowed_args())
- for (StringSetArg::AllowedArgIterator it = a.begin_allowed_args(), it_end = a.end_allowed_args();
+ for (StringSetArg::AllowedArgConstIterator it = a.begin_allowed_args(), it_end = a.end_allowed_args();
it != it_end; ++it)
{
std::stringstream p;
@@ -73,7 +73,7 @@ void ArgsDumper::visit(const EnumArg & a)
{
generic_visit(a);
- for (EnumArg::AllowedArgIterator it = a.begin_allowed_args(), it_end = a.end_allowed_args();
+ for (EnumArg::AllowedArgConstIterator it = a.begin_allowed_args(), it_end = a.end_allowed_args();
it != it_end; ++it)
{
std::stringstream p;
diff --git a/paludis/args/args_group.cc b/paludis/args/args_group.cc
index f833611..671f3a1 100644
--- a/paludis/args/args_group.cc
+++ b/paludis/args/args_group.cc
@@ -64,15 +64,15 @@ ArgsGroup::~ArgsGroup()
{
}
-ArgsGroup::Iterator
+ArgsGroup::ConstIterator
ArgsGroup::begin() const
{
- return Iterator(_imp->args_options.begin());
+ return ConstIterator(_imp->args_options.begin());
}
-ArgsGroup::Iterator
+ArgsGroup::ConstIterator
ArgsGroup::end() const
{
- return Iterator(_imp->args_options.end());
+ return ConstIterator(_imp->args_options.end());
}
diff --git a/paludis/args/args_group.hh b/paludis/args/args_group.hh
index ec94552..31bac42 100644
--- a/paludis/args/args_group.hh
+++ b/paludis/args/args_group.hh
@@ -74,10 +74,10 @@ namespace paludis
///\name Iterate over our ArgsOptions.
///\{
- typedef libwrapiter::ForwardIterator<ArgsGroup, ArgsOption * const> Iterator;
+ typedef libwrapiter::ForwardIterator<ArgsGroup, ArgsOption * const> ConstIterator;
- Iterator begin() const;
- Iterator end() const;
+ ConstIterator begin() const;
+ ConstIterator end() const;
///\}
diff --git a/paludis/args/args_handler.cc b/paludis/args/args_handler.cc
index fbff4da..efb3da5 100644
--- a/paludis/args/args_handler.cc
+++ b/paludis/args/args_handler.cc
@@ -180,16 +180,16 @@ ArgsHandler::dump_to_stream(std::ostream & s) const
}
}
-ArgsHandler::ParametersIterator
+ArgsHandler::ParametersConstIterator
ArgsHandler::begin_parameters() const
{
- return ParametersIterator(_imp->parameters.begin());
+ return ParametersConstIterator(_imp->parameters.begin());
}
-ArgsHandler::ParametersIterator
+ArgsHandler::ParametersConstIterator
ArgsHandler::end_parameters() const
{
- return ParametersIterator(_imp->parameters.end());
+ return ParametersConstIterator(_imp->parameters.end());
}
bool
@@ -214,39 +214,39 @@ ArgsHandler::add_option(ArgsOption * const opt, const std::string & long_name,
_imp->shortopts[short_name] = opt;
}
-ArgsHandler::UsageLineIterator
+ArgsHandler::UsageLineConstIterator
ArgsHandler::begin_usage_lines() const
{
- return UsageLineIterator(_imp->usage_lines.begin());
+ return UsageLineConstIterator(_imp->usage_lines.begin());
}
-ArgsHandler::UsageLineIterator
+ArgsHandler::UsageLineConstIterator
ArgsHandler::end_usage_lines() const
{
- return UsageLineIterator(_imp->usage_lines.end());
+ return UsageLineConstIterator(_imp->usage_lines.end());
}
-ArgsHandler::EnvironmentLineIterator
+ArgsHandler::EnvironmentLineConstIterator
ArgsHandler::begin_environment_lines() const
{
- return EnvironmentLineIterator(_imp->environment_lines.begin());
+ return EnvironmentLineConstIterator(_imp->environment_lines.begin());
}
-ArgsHandler::EnvironmentLineIterator
+ArgsHandler::EnvironmentLineConstIterator
ArgsHandler::end_environment_lines() const
{
- return EnvironmentLineIterator(_imp->environment_lines.end());
+ return EnvironmentLineConstIterator(_imp->environment_lines.end());
}
-ArgsHandler::ArgsGroupsIterator
+ArgsHandler::ArgsGroupsConstIterator
ArgsHandler::begin_args_groups() const
{
- return ArgsGroupsIterator(_imp->groups.begin());
+ return ArgsGroupsConstIterator(_imp->groups.begin());
}
-ArgsHandler::ArgsGroupsIterator
+ArgsHandler::ArgsGroupsConstIterator
ArgsHandler::end_args_groups() const
{
- return ArgsGroupsIterator(_imp->groups.end());
+ return ArgsGroupsConstIterator(_imp->groups.end());
}
diff --git a/paludis/args/args_handler.hh b/paludis/args/args_handler.hh
index 62d6c09..16ae954 100644
--- a/paludis/args/args_handler.hh
+++ b/paludis/args/args_handler.hh
@@ -103,11 +103,11 @@ namespace paludis
///\name Iterate over our parameters (non - and -- switches and their values)
///\{
- typedef libwrapiter::ForwardIterator<ArgsHandler, const std::string> ParametersIterator;
+ typedef libwrapiter::ForwardIterator<ArgsHandler, const std::string> ParametersConstIterator;
- ParametersIterator begin_parameters() const;
+ ParametersConstIterator begin_parameters() const;
- ParametersIterator end_parameters() const;
+ ParametersConstIterator end_parameters() const;
bool empty() const;
@@ -150,11 +150,11 @@ namespace paludis
///\name Iterate over our usage lines (for documentation)
///\{
- typedef libwrapiter::ForwardIterator<ArgsHandler, const std::string> UsageLineIterator;
+ typedef libwrapiter::ForwardIterator<ArgsHandler, const std::string> UsageLineConstIterator;
- UsageLineIterator begin_usage_lines() const;
+ UsageLineConstIterator begin_usage_lines() const;
- UsageLineIterator end_usage_lines() const;
+ UsageLineConstIterator end_usage_lines() const;
///\}
@@ -162,22 +162,22 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<ArgsHandler,
- const std::pair<std::string, std::string> > EnvironmentLineIterator;
+ const std::pair<std::string, std::string> > EnvironmentLineConstIterator;
- EnvironmentLineIterator begin_environment_lines() const;
+ EnvironmentLineConstIterator begin_environment_lines() const;
- EnvironmentLineIterator end_environment_lines() const;
+ EnvironmentLineConstIterator end_environment_lines() const;
///\}
///\name Iterate over our groups
///\{
- typedef libwrapiter::ForwardIterator<ArgsHandler, ArgsGroup * const> ArgsGroupsIterator;
+ typedef libwrapiter::ForwardIterator<ArgsHandler, ArgsGroup * const> ArgsGroupsConstIterator;
- ArgsGroupsIterator begin_args_groups() const;
+ ArgsGroupsConstIterator begin_args_groups() const;
- ArgsGroupsIterator end_args_groups() const;
+ ArgsGroupsConstIterator end_args_groups() const;
///\}
};
diff --git a/paludis/args/args_option.cc b/paludis/args/args_option.cc
index b8fc2f4..c61a145 100644
--- a/paludis/args/args_option.cc
+++ b/paludis/args/args_option.cc
@@ -155,16 +155,16 @@ StringSetArg::StringSetArg(ArgsGroup * const g, const std::string & our_long_nam
std::back_inserter(_imp->allowed_args));
}
-StringSetArg::Iterator
+StringSetArg::ConstIterator
StringSetArg::begin_args() const
{
- return Iterator(_imp->args.begin());
+ return ConstIterator(_imp->args.begin());
}
-StringSetArg::Iterator
+StringSetArg::ConstIterator
StringSetArg::end_args() const
{
- return Iterator(_imp->args.end());
+ return ConstIterator(_imp->args.end());
}
void
@@ -297,31 +297,31 @@ EnumArg::EnumArg(ArgsGroup * const our_group, const std::string & our_long_name,
_imp->allowed_args = opts._imp->options;
}
-EnumArg::AllowedArgIterator
+EnumArg::AllowedArgConstIterator
EnumArg::begin_allowed_args() const
{
- return AllowedArgIterator(_imp->allowed_args.begin());
+ return AllowedArgConstIterator(_imp->allowed_args.begin());
}
-EnumArg::AllowedArgIterator
+EnumArg::AllowedArgConstIterator
EnumArg::end_allowed_args() const
{
- return AllowedArgIterator(_imp->allowed_args.end());
+ return AllowedArgConstIterator(_imp->allowed_args.end());
}
StringSetArg::~StringSetArg()
{
}
-StringSetArg::AllowedArgIterator
+StringSetArg::AllowedArgConstIterator
StringSetArg::begin_allowed_args() const
{
- return AllowedArgIterator(_imp->allowed_args.begin());
+ return AllowedArgConstIterator(_imp->allowed_args.begin());
}
-StringSetArg::AllowedArgIterator
+StringSetArg::AllowedArgConstIterator
StringSetArg::end_allowed_args() const
{
- return AllowedArgIterator(_imp->allowed_args.end());
+ return AllowedArgConstIterator(_imp->allowed_args.end());
}
diff --git a/paludis/args/args_option.hh b/paludis/args/args_option.hh
index d091bdb..e5ec965 100644
--- a/paludis/args/args_option.hh
+++ b/paludis/args/args_option.hh
@@ -42,7 +42,7 @@ namespace paludis
* \ingroup grplibpaludisargs
*/
class PALUDIS_VISIBLE ArgsOption :
- public virtual MutableAcceptInterface<ArgsVisitorTypes>
+ public virtual AcceptInterface<ArgsVisitorTypes>
{
friend class ArgsHandler;
@@ -129,7 +129,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE SwitchArg :
public ArgsOption,
- public MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, SwitchArg>
+ public AcceptInterfaceVisitsThis<ArgsVisitorTypes, SwitchArg>
{
public:
/**
@@ -148,7 +148,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE StringArg :
public ArgsOption,
- public MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, StringArg>
+ public AcceptInterfaceVisitsThis<ArgsVisitorTypes, StringArg>
{
private:
std::string _argument;
@@ -187,7 +187,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE StringSetArg :
public ArgsOption,
- public MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, StringSetArg>,
+ public AcceptInterfaceVisitsThis<ArgsVisitorTypes, StringSetArg>,
private PrivateImplementationPattern<StringSetArg>
{
private:
@@ -251,11 +251,11 @@ namespace paludis
///\name Iterate over our args.
///\{
- typedef libwrapiter::ForwardIterator<StringArg, const std::string> Iterator;
+ typedef libwrapiter::ForwardIterator<StringArg, const std::string> ConstIterator;
- Iterator begin_args() const;
+ ConstIterator begin_args() const;
- Iterator end_args() const;
+ ConstIterator end_args() const;
///\}
@@ -268,11 +268,11 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<StringSetArg,
- const std::pair<std::string, std::string> > AllowedArgIterator;
+ const std::pair<std::string, std::string> > AllowedArgConstIterator;
- AllowedArgIterator begin_allowed_args() const;
+ AllowedArgConstIterator begin_allowed_args() const;
- AllowedArgIterator end_allowed_args() const;
+ AllowedArgConstIterator end_allowed_args() const;
///\}
};
@@ -285,7 +285,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE AliasArg :
public ArgsOption,
- public MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, AliasArg>
+ public AcceptInterfaceVisitsThis<ArgsVisitorTypes, AliasArg>
{
private:
ArgsOption * const _other;
@@ -322,7 +322,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE IntegerArg :
public ArgsOption,
- public MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, IntegerArg>
+ public AcceptInterfaceVisitsThis<ArgsVisitorTypes, IntegerArg>
{
private:
int _argument;
@@ -352,7 +352,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE EnumArg :
public ArgsOption,
- public MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, EnumArg>,
+ public AcceptInterfaceVisitsThis<ArgsVisitorTypes, EnumArg>,
private PrivateImplementationPattern<EnumArg>
{
private:
@@ -423,11 +423,11 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<EnumArg,
- const std::pair<std::string, std::string> > AllowedArgIterator;
+ const std::pair<std::string, std::string> > AllowedArgConstIterator;
- AllowedArgIterator begin_allowed_args() const;
+ AllowedArgConstIterator begin_allowed_args() const;
- AllowedArgIterator end_allowed_args() const;
+ AllowedArgConstIterator end_allowed_args() const;
///\}
};
diff --git a/paludis/args/args_visitor.cc b/paludis/args/args_visitor.cc
index 37066ad..245de48 100644
--- a/paludis/args/args_visitor.cc
+++ b/paludis/args/args_visitor.cc
@@ -38,15 +38,15 @@
using namespace paludis;
using namespace paludis::args;
-template class MutableVisitor<ArgsVisitorTypes>;
-template class MutableAcceptInterface<ArgsVisitorTypes>;
-
-template class MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, IntegerArg>;
-template class MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, EnumArg>;
-template class MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, StringArg>;
-template class MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, StringSetArg>;
-template class MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, AliasArg>;
-template class MutableAcceptInterfaceVisitsThis<ArgsVisitorTypes, SwitchArg>;
+template class Visitor<ArgsVisitorTypes>;
+template class AcceptInterface<ArgsVisitorTypes>;
+
+template class AcceptInterfaceVisitsThis<ArgsVisitorTypes, IntegerArg>;
+template class AcceptInterfaceVisitsThis<ArgsVisitorTypes, EnumArg>;
+template class AcceptInterfaceVisitsThis<ArgsVisitorTypes, StringArg>;
+template class AcceptInterfaceVisitsThis<ArgsVisitorTypes, StringSetArg>;
+template class AcceptInterfaceVisitsThis<ArgsVisitorTypes, AliasArg>;
+template class AcceptInterfaceVisitsThis<ArgsVisitorTypes, SwitchArg>;
template class Visits<IntegerArg>;
template class Visits<EnumArg>;
diff --git a/paludis/args/args_visitor.hh b/paludis/args/args_visitor.hh
index 1d83eb8..ecbf94e 100644
--- a/paludis/args/args_visitor.hh
+++ b/paludis/args/args_visitor.hh
@@ -69,7 +69,7 @@ namespace paludis
* \ingroup grplibpaludisargs
*/
class PALUDIS_VISIBLE ArgsVisitor :
- public MutableVisitor<ArgsVisitorTypes>
+ public Visitor<ArgsVisitorTypes>
{
private:
libwrapiter::ForwardIterator<ArgsVisitor, std::string> * _args_index, _args_end;
diff --git a/paludis/args/man.cc b/paludis/args/man.cc
index 121e796..3dda655 100644
--- a/paludis/args/man.cc
+++ b/paludis/args/man.cc
@@ -65,7 +65,7 @@ namespace
_dw.start_extra_arg();
- for (EnumArg::AllowedArgIterator a(e.begin_allowed_args()), a_end(e.end_allowed_args()) ;
+ for (EnumArg::AllowedArgConstIterator a(e.begin_allowed_args()), a_end(e.end_allowed_args()) ;
a != a_end ; ++a)
{
_dw.extra_arg_enum(a->first, a->second, e.default_arg());
@@ -81,7 +81,7 @@ namespace
_dw.start_extra_arg();
- for (EnumArg::AllowedArgIterator a(e.begin_allowed_args()), a_end(e.end_allowed_args()) ;
+ for (EnumArg::AllowedArgConstIterator a(e.begin_allowed_args()), a_end(e.end_allowed_args()) ;
a != a_end ; ++a)
{
_dw.extra_arg_string_set(a->first, a->second);
@@ -98,7 +98,7 @@ paludis::args::generate_doc(DocWriter & dw, const ArgsHandler * const h)
{
dw.heading(h->app_name(), h->man_section(), h->app_synopsis());
- for (ArgsHandler::UsageLineIterator u(h->begin_usage_lines()),
+ for (ArgsHandler::UsageLineConstIterator u(h->begin_usage_lines()),
u_end(h->end_usage_lines()) ; u != u_end ; ++u)
{
dw.usage_line(h->app_name(), *u);
@@ -106,12 +106,12 @@ paludis::args::generate_doc(DocWriter & dw, const ArgsHandler * const h)
dw.start_description(h->app_description());
- for (ArgsHandler::ArgsGroupsIterator a(h->begin_args_groups()),
+ for (ArgsHandler::ArgsGroupsConstIterator a(h->begin_args_groups()),
a_end(h->end_args_groups()) ; a != a_end ; ++a)
{
dw.start_arg_group((*a)->name(), (*a)->description());
- for (paludis::args::ArgsGroup::Iterator b((*a)->begin()), b_end((*a)->end()) ;
+ for (paludis::args::ArgsGroup::ConstIterator b((*a)->begin()), b_end((*a)->end()) ;
b != b_end ; ++b)
{
dw.arg_group_item((*b)->short_name(), (*b)->long_name(), (*b)->description());
@@ -129,7 +129,7 @@ paludis::args::generate_doc(DocWriter & dw, const ArgsHandler * const h)
{
dw.start_environment();
- for (ArgsHandler::EnvironmentLineIterator a(h->begin_environment_lines()),
+ for (ArgsHandler::EnvironmentLineConstIterator a(h->begin_environment_lines()),
a_end(h->end_environment_lines()) ; a != a_end ; ++a)
{
dw.environment_line(a->first, a->second);
diff --git a/paludis/config_file.cc b/paludis/config_file.cc
index d5e3182..d2e8204 100644
--- a/paludis/config_file.cc
+++ b/paludis/config_file.cc
@@ -225,16 +225,16 @@ LineConfigFile::~LineConfigFile()
{
}
-LineConfigFile::Iterator
+LineConfigFile::ConstIterator
LineConfigFile::begin() const
{
- return Iterator(_imp->lines.begin());
+ return ConstIterator(_imp->lines.begin());
}
-LineConfigFile::Iterator
+LineConfigFile::ConstIterator
LineConfigFile::end() const
{
- return Iterator(_imp->lines.end());
+ return ConstIterator(_imp->lines.end());
}
namespace paludis
@@ -324,7 +324,7 @@ KeyValueConfigFile::Defaults::get(const std::string & k) const
return _imp->kv->get(k);
else if (_imp->a)
{
- Map<std::string, std::string>::Iterator x(_imp->a->find(k));
+ Map<std::string, std::string>::ConstIterator x(_imp->a->find(k));
if (x == _imp->a->end())
return "";
else
@@ -341,26 +341,26 @@ namespace
static std::map<std::string, std::string> empty_map;
}
-KeyValueConfigFile::Defaults::Iterator
+KeyValueConfigFile::Defaults::ConstIterator
KeyValueConfigFile::Defaults::begin() const
{
if (_imp->kv)
- return Iterator(_imp->kv->begin());
+ return ConstIterator(_imp->kv->begin());
else if (_imp->a)
- return Iterator(_imp->a->begin());
+ return ConstIterator(_imp->a->begin());
else
- return Iterator(empty_map.begin());
+ return ConstIterator(empty_map.begin());
}
-KeyValueConfigFile::Defaults::Iterator
+KeyValueConfigFile::Defaults::ConstIterator
KeyValueConfigFile::Defaults::end() const
{
if (_imp->kv)
- return Iterator(_imp->kv->end());
+ return ConstIterator(_imp->kv->end());
else if (_imp->a)
- return Iterator(_imp->a->end());
+ return ConstIterator(_imp->a->end());
else
- return Iterator(empty_map.end());
+ return ConstIterator(empty_map.end());
}
namespace paludis
@@ -741,16 +741,16 @@ KeyValueConfigFile::~KeyValueConfigFile()
{
}
-KeyValueConfigFile::Iterator
+KeyValueConfigFile::ConstIterator
KeyValueConfigFile::begin() const
{
- return Iterator(_imp->keys.begin());
+ return ConstIterator(_imp->keys.begin());
}
-KeyValueConfigFile::Iterator
+KeyValueConfigFile::ConstIterator
KeyValueConfigFile::end() const
{
- return Iterator(_imp->keys.end());
+ return ConstIterator(_imp->keys.end());
}
std::string
diff --git a/paludis/config_file.hh b/paludis/config_file.hh
index 3c396c3..9d004fd 100644
--- a/paludis/config_file.hh
+++ b/paludis/config_file.hh
@@ -195,10 +195,10 @@ namespace paludis
///\name Iterate over our lines
///\{
- typedef libwrapiter::ForwardIterator<LineConfigFile, const std::string> Iterator;
+ typedef libwrapiter::ForwardIterator<LineConfigFile, const std::string> ConstIterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
};
@@ -286,9 +286,9 @@ namespace paludis
///\name Iterate over our default keys
///\{
- typedef libwrapiter::ForwardIterator<Defaults, const std::pair<const std::string, std::string> > Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<Defaults, const std::pair<const std::string, std::string> > ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
};
@@ -318,9 +318,9 @@ namespace paludis
///\name Iterate over our keys
///\{
- typedef libwrapiter::ForwardIterator<KeyValueConfigFile, const std::pair<const std::string, std::string> > Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<KeyValueConfigFile, const std::pair<const std::string, std::string> > ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/contents.cc b/paludis/contents.cc
index 980b305..8d900d9 100644
--- a/paludis/contents.cc
+++ b/paludis/contents.cc
@@ -129,16 +129,16 @@ Contents::add(tr1::shared_ptr<const ContentsEntry> c)
_imp->c.push_back(c);
}
-Contents::Iterator
+Contents::ConstIterator
Contents::begin() const
{
- return Iterator(_imp->c.begin());
+ return ConstIterator(_imp->c.begin());
}
-Contents::Iterator
+Contents::ConstIterator
Contents::end() const
{
- return Iterator(_imp->c.end());
+ return ConstIterator(_imp->c.end());
}
std::ostream &
diff --git a/paludis/contents.hh b/paludis/contents.hh
index df086dd..2f0191f 100644
--- a/paludis/contents.hh
+++ b/paludis/contents.hh
@@ -235,12 +235,12 @@ namespace paludis
///\name Iterate over our entries
///\{
- typedef libwrapiter::ForwardIterator<Contents, const tr1::shared_ptr<const ContentsEntry> > Iterator;
+ typedef libwrapiter::ForwardIterator<Contents, const tr1::shared_ptr<const ContentsEntry> > ConstIterator;
- Iterator begin() const
+ ConstIterator begin() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const
+ ConstIterator end() const
PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index 1e7a6b8..c753b64 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -163,7 +163,7 @@ namespace
return;
tr1::shared_ptr<DepListEntryTags> t(new DepListEntryTags);
GenerationGreaterThan pred(g);
- for (DepListEntryTags::Iterator i(e.tags->begin()), i_end(e.tags->end()) ;
+ for (DepListEntryTags::ConstIterator i(e.tags->begin()), i_end(e.tags->end()) ;
i != i_end ; ++i)
if (! pred(*i))
t->insert(*i);
@@ -388,7 +388,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
query::Matches(a),
qo_order_by_version));
- for (PackageIDSequence::ReverseIterator p(installable_candidates->rbegin()),
+ for (PackageIDSequence::ReverseConstIterator p(installable_candidates->rbegin()),
p_end(installable_candidates->rend()) ; p != p_end ; ++p)
if (! (*p)->masked())
{
@@ -399,21 +399,21 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
/* are we allowed to override mask reasons? */
if (! best_visible_candidate && d->_imp->opts->override_masks)
{
- for (DepListOverrideMasksFunctions::Iterator of(d->_imp->opts->override_masks->begin()),
+ for (DepListOverrideMasksFunctions::ConstIterator of(d->_imp->opts->override_masks->begin()),
of_end(d->_imp->opts->override_masks->end()) ; of != of_end ; ++of)
{
if (best_visible_candidate)
break;
- for (PackageIDSequence::ReverseIterator p(installable_candidates->rbegin()),
+ for (PackageIDSequence::ReverseConstIterator p(installable_candidates->rbegin()),
p_end(installable_candidates->rend()) ; p != p_end ; ++p)
{
bool success(true);
- for (PackageID::MasksIterator m((*p)->begin_masks()), m_end((*p)->end_masks()) ;
+ for (PackageID::MasksConstIterator m((*p)->begin_masks()), m_end((*p)->end_masks()) ;
m != m_end ; ++m)
{
bool local_success(false);
- for (DepListOverrideMasksFunctions::Iterator o(d->_imp->opts->override_masks->begin()),
+ for (DepListOverrideMasksFunctions::ConstIterator o(d->_imp->opts->override_masks->begin()),
o_end(next(of)) ; o != o_end ; ++o)
if ((*o)(**p, **m))
local_success = true;
@@ -474,7 +474,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
tr1::shared_ptr<const PackageIDSequence> match_except_reqs(d->_imp->env->package_database()->query(
query::Matches(*a.without_use_requirements()), qo_whatever));
- for (PackageIDSequence::Iterator i(match_except_reqs->begin()),
+ for (PackageIDSequence::ConstIterator i(match_except_reqs->begin()),
i_end(match_except_reqs->end()) ; i != i_end ; ++i)
if (! (*i)->masked())
throw UseRequirementsNotMetError(stringify(a));
@@ -492,7 +492,7 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
}
tr1::shared_ptr<PackageIDSequence> already_installed_in_same_slot(new PackageIDSequence);
- for (PackageIDSequence::Iterator aa(already_installed->begin()),
+ for (PackageIDSequence::ConstIterator aa(already_installed->begin()),
aa_end(already_installed->end()) ; aa != aa_end ; ++aa)
if ((*aa)->slot() == best_visible_candidate->slot())
already_installed_in_same_slot->push_back(*aa);
@@ -769,7 +769,7 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
if (already_installed->empty() && will_be_installed.empty() && ! check_whole_list)
return;
- for (PackageIDSequence::Iterator aa(already_installed->begin()),
+ for (PackageIDSequence::ConstIterator aa(already_installed->begin()),
aa_end(already_installed->end()) ; aa != aa_end ; ++aa)
{
if (! match_package(*d->_imp->env, *a.blocked_spec(), **aa))
@@ -1008,7 +1008,7 @@ DepList::add_package(const tr1::shared_ptr<const PackageID> & p, tr1::shared_ptr
throw DistributionConfigurationError("Package '" + stringify(*p) + "' has PROVIDEs, but this distribution "
"does not support old style virtuals");
- for (DepSpecFlattener::Iterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
+ for (DepSpecFlattener::ConstIterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
{
tr1::shared_ptr<VersionRequirements> v(new VersionRequirements);
v->push_back(VersionRequirement(vo_equal, p->version()));
@@ -1470,7 +1470,7 @@ tr1::shared_ptr<Repository>
DepList::find_destination(const PackageID & p,
tr1::shared_ptr<const DestinationsSet> dd)
{
- for (DestinationsSet::Iterator d(dd->begin()), d_end(dd->end()) ;
+ for (DestinationsSet::ConstIterator d(dd->begin()), d_end(dd->end()) ;
d != d_end ; ++d)
if ((*d)->destination_interface)
if ((*d)->destination_interface->is_suitable_destination_for(p))
diff --git a/paludis/dep_list/dep_list_TEST.cc b/paludis/dep_list/dep_list_TEST.cc
index d5ac3f4..4620016 100644
--- a/paludis/dep_list/dep_list_TEST.cc
+++ b/paludis/dep_list/dep_list_TEST.cc
@@ -1727,7 +1727,7 @@ namespace test_cases
bool cat_three_has_first_tag_from_cat_two(false);
bool cat_three_has_second_tag_from_cat_two(false);
- for (DepListEntryTags::Iterator tag_it(tags->begin()),
+ for (DepListEntryTags::ConstIterator tag_it(tags->begin()),
tag_it_end(tags->end()); tag_it_end != tag_it; ++tag_it)
{
if ("dependency" != tag_it->tag->category())
diff --git a/paludis/dep_list/exceptions.cc b/paludis/dep_list/exceptions.cc
index 08a3561..c26cfc4 100644
--- a/paludis/dep_list/exceptions.cc
+++ b/paludis/dep_list/exceptions.cc
@@ -67,7 +67,7 @@ namespace
{
std::string result;
bool need_comma(false);
- for (DestinationsSet::Iterator d(dd->begin()), d_end(dd->end()) ;
+ for (DestinationsSet::ConstIterator d(dd->begin()), d_end(dd->end()) ;
d != d_end ; ++d)
{
if (need_comma)
diff --git a/paludis/dep_list/override_functions.cc b/paludis/dep_list/override_functions.cc
index bb6ed7a..cf9c2c3 100644
--- a/paludis/dep_list/override_functions.cc
+++ b/paludis/dep_list/override_functions.cc
@@ -100,7 +100,7 @@ namespace
void visit(const MetadataSetKey<KeywordNameSet> & k)
{
tr1::shared_ptr<KeywordNameSet> kk(new KeywordNameSet);
- for (KeywordNameSet::Iterator i(k.value()->begin()), i_end(k.value()->end()) ;
+ for (KeywordNameSet::ConstIterator i(k.value()->begin()), i_end(k.value()->end()) ;
i != i_end ; ++i)
{
kk->insert(*i);
@@ -223,7 +223,7 @@ namespace
void visit(const MetadataSetKey<KeywordNameSet> & k)
{
tr1::shared_ptr<KeywordNameSet> kk(new KeywordNameSet);
- for (KeywordNameSet::Iterator i(k.value()->begin()), i_end(k.value()->end()) ;
+ for (KeywordNameSet::ConstIterator i(k.value()->begin()), i_end(k.value()->end()) ;
i != i_end ; ++i)
if ('-' == stringify(*i).at(0))
kk->insert(KeywordName(stringify(*i).substr(1)));
diff --git a/paludis/dep_list/range_rewriter.cc b/paludis/dep_list/range_rewriter.cc
index 00a4a33..4eefb58 100644
--- a/paludis/dep_list/range_rewriter.cc
+++ b/paludis/dep_list/range_rewriter.cc
@@ -86,7 +86,7 @@ RangeRewriter::visit_leaf(const PackageDepSpec & a)
return;
}
- for (VersionRequirements::Iterator v(a.version_requirements_ptr()->begin()),
+ for (VersionRequirements::ConstIterator v(a.version_requirements_ptr()->begin()),
v_end(a.version_requirements_ptr()->end()) ; v != v_end ; ++v)
_spec->version_requirements_ptr()->push_back(*v);
}
diff --git a/paludis/dep_list/show_suggest_visitor.cc b/paludis/dep_list/show_suggest_visitor.cc
index d919f6c..31c6e22 100644
--- a/paludis/dep_list/show_suggest_visitor.cc
+++ b/paludis/dep_list/show_suggest_visitor.cc
@@ -118,7 +118,7 @@ ShowSuggestVisitor::visit_leaf(const PackageDepSpec & a)
return;
}
- for (PackageIDSequence::Iterator m(matches->begin()), m_end(matches->end()) ;
+ for (PackageIDSequence::ConstIterator m(matches->begin()), m_end(matches->end()) ;
m != m_end ; ++m)
{
if ((*m)->masked())
diff --git a/paludis/dep_list/uninstall_list.cc b/paludis/dep_list/uninstall_list.cc
index 1cff33d..3e5ceec 100644
--- a/paludis/dep_list/uninstall_list.cc
+++ b/paludis/dep_list/uninstall_list.cc
@@ -164,20 +164,20 @@ UninstallList::add_unused()
world_plus_deps->begin(), world_plus_deps->end(), unused->inserter(),
PackageIDSetComparator());
- for (PackageIDSet::Iterator i(unused->begin()), i_end(unused->end()) ; i != i_end ; ++i)
+ for (PackageIDSet::ConstIterator i(unused->begin()), i_end(unused->end()) ; i != i_end ; ++i)
add_package(*i, tr1::shared_ptr<DepTag>(), (*i)->virtual_for_key() ? ulk_virtual : ulk_package);
}
-UninstallList::Iterator
+UninstallList::ConstIterator
UninstallList::begin() const
{
- return Iterator(_imp->uninstall_list.begin());
+ return ConstIterator(_imp->uninstall_list.begin());
}
-UninstallList::Iterator
+UninstallList::ConstIterator
UninstallList::end() const
{
- return Iterator(_imp->uninstall_list.end());
+ return ConstIterator(_imp->uninstall_list.end());
}
UninstallListOptions::UninstallListOptions() :
@@ -220,18 +220,18 @@ UninstallList::collect_all_installed() const
Context context("When collecting all installed packages:");
tr1::shared_ptr<PackageIDSet> result(new PackageIDSet);
- for (PackageDatabase::RepositoryIterator i(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator i(_imp->env->package_database()->begin_repositories()),
i_end(_imp->env->package_database()->end_repositories()) ; i != i_end ; ++i)
{
if (! (*i)->installed_interface)
continue;
tr1::shared_ptr<const CategoryNamePartSet> cats((*i)->category_names());
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs((*i)->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> ids((*i)->package_ids(*p));
@@ -275,7 +275,7 @@ namespace
tr1::shared_ptr<const PackageIDSequence> m(env->package_database()->query(
query::Matches(a) & query::InstalledAtRoot(env->root()), qo_order_by_version));
- for (PackageIDSequence::Iterator it = m->begin(), it_end = m->end();
+ for (PackageIDSequence::ConstIterator it = m->begin(), it_end = m->end();
it_end != it; ++it)
matches->insert(DepTagEntry(tr1::shared_ptr<const DepTag>(new DependencyDepTag(*it, a, conditions)), 0));
}
@@ -319,7 +319,7 @@ UninstallList::collect_depped_upon(tr1::shared_ptr<const PackageIDSet> targets)
tr1::shared_ptr<PackageIDSet> result(new PackageIDSet);
Lock l(_imp->dep_collector_cache_mutex);
- for (PackageIDSet::Iterator i(targets->begin()), i_end(targets->end()) ;
+ for (PackageIDSet::ConstIterator i(targets->begin()), i_end(targets->end()) ;
i != i_end ; ++i)
{
Context local_context("When collecting depended upon packages for '" + stringify(**i) + "':");
@@ -342,7 +342,7 @@ UninstallList::collect_depped_upon(tr1::shared_ptr<const PackageIDSet> targets)
tr1::shared_ptr<const DepListEntryTags>(c.matches))).first;
}
- for (DepListEntryTags::Iterator it(cache->second->begin()), it_end(cache->second->end());
+ for (DepListEntryTags::ConstIterator it(cache->second->begin()), it_end(cache->second->end());
it_end != it; ++it)
result->insert(tr1::static_pointer_cast<const DependencyDepTag>(it->tag)->package_id());
}
@@ -394,7 +394,7 @@ UninstallList::add_unused_dependencies()
/* if any of them aren't already on the list, and aren't in world, add them and recurse */
tr1::shared_ptr<SetSpecTree::ConstItem> world(_imp->env->set(SetName("world")));
- for (PackageIDSet::Iterator i(unused_dependencies->begin()),
+ for (PackageIDSet::ConstIterator i(unused_dependencies->begin()),
i_end(unused_dependencies->end()) ; i != i_end ; ++i)
{
if (match_package_in_set(*_imp->env, *world, **i))
@@ -419,7 +419,7 @@ UninstallList::add_dependencies(const PackageID & e, const bool error)
Lock l(_imp->dep_collector_cache_mutex);
- for (PackageIDSet::Iterator i(everything->begin()),
+ for (PackageIDSet::ConstIterator i(everything->begin()),
i_end(everything->end()) ; i != i_end ; ++i)
{
Context local_context("When seeing whether '" + stringify(**i) + "' has a dep:");
@@ -442,7 +442,7 @@ UninstallList::add_dependencies(const PackageID & e, const bool error)
}
bool logged(false);
- for (DepListEntryTags::Iterator it(cache->second->begin()), it_end(cache->second->end());
+ for (DepListEntryTags::ConstIterator it(cache->second->begin()), it_end(cache->second->end());
it_end != it; ++it)
{
tr1::shared_ptr<const DependencyDepTag> tag(tr1::static_pointer_cast<const DependencyDepTag>(it->tag));
@@ -471,7 +471,7 @@ UninstallList::collect_world() const
tr1::shared_ptr<const PackageIDSet> everything(collect_all_installed());
tr1::shared_ptr<SetSpecTree::ConstItem> world(_imp->env->set(SetName("world")));
- for (PackageIDSet::Iterator i(everything->begin()),
+ for (PackageIDSet::ConstIterator i(everything->begin()),
i_end(everything->end()) ; i != i_end ; ++i)
if (match_package_in_set(*_imp->env, *world, **i))
result->insert(*i);
diff --git a/paludis/dep_list/uninstall_list.hh b/paludis/dep_list/uninstall_list.hh
index c5457d2..4cbb79e 100644
--- a/paludis/dep_list/uninstall_list.hh
+++ b/paludis/dep_list/uninstall_list.hh
@@ -95,9 +95,9 @@ namespace paludis
///\name Iterate over our items to remove
///\{
- typedef libwrapiter::ForwardIterator<UninstallList, const UninstallListEntry> Iterator;
- Iterator begin() const;
- Iterator end() const;
+ typedef libwrapiter::ForwardIterator<UninstallList, const UninstallListEntry> ConstIterator;
+ ConstIterator begin() const;
+ ConstIterator end() const;
///\}
};
diff --git a/paludis/dep_list/uninstall_list_TEST.cc b/paludis/dep_list/uninstall_list_TEST.cc
index 2cd16c8..f1da98e 100644
--- a/paludis/dep_list/uninstall_list_TEST.cc
+++ b/paludis/dep_list/uninstall_list_TEST.cc
@@ -109,14 +109,14 @@ namespace test_cases
{
TEST_CHECK(true);
UninstallList d(&env, options());
- for (PackageIDSequence::Iterator i(targets->begin()),
+ for (PackageIDSequence::ConstIterator i(targets->begin()),
i_end(targets->end()) ; i != i_end ; ++i)
d.add(*i);
TEST_CHECK(true);
unsigned n(0);
std::list<std::string>::const_iterator exp(expected.begin());
- UninstallList::Iterator got(d.begin());
+ UninstallList::ConstIterator got(d.begin());
while (true)
{
TestMessageSuffix s(stringify(n++), true);
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index 06ef737..3667553 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -737,7 +737,7 @@ paludis::operator<< (std::ostream & s, const PackageDepSpec & a)
{
bool need_op(false);
s << "[";
- for (VersionRequirements::Iterator r(a.version_requirements_ptr()->begin()),
+ for (VersionRequirements::ConstIterator r(a.version_requirements_ptr()->begin()),
r_end(a.version_requirements_ptr()->end()) ; r != r_end ; ++r)
{
if (need_op)
@@ -779,7 +779,7 @@ paludis::operator<< (std::ostream & s, const PackageDepSpec & a)
if (a.use_requirements_ptr())
{
- for (UseRequirements::Iterator u(a.use_requirements_ptr()->begin()),
+ for (UseRequirements::ConstIterator u(a.use_requirements_ptr()->begin()),
u_end(a.use_requirements_ptr()->end()) ; u != u_end ; ++u)
s << "[" << (u->second == use_disabled ? "-" + stringify(u->first) :
stringify(u->first)) << "]";
@@ -857,22 +857,22 @@ UseRequirements::~UseRequirements()
{
}
-UseRequirements::Iterator
+UseRequirements::ConstIterator
UseRequirements::begin() const
{
- return Iterator(_imp->reqs.begin());
+ return ConstIterator(_imp->reqs.begin());
}
-UseRequirements::Iterator
+UseRequirements::ConstIterator
UseRequirements::end() const
{
- return Iterator(_imp->reqs.end());
+ return ConstIterator(_imp->reqs.end());
}
-UseRequirements::Iterator
+UseRequirements::ConstIterator
UseRequirements::find(const UseFlagName & u) const
{
- return Iterator(_imp->reqs.find(u));
+ return ConstIterator(_imp->reqs.find(u));
}
bool
@@ -884,7 +884,7 @@ UseRequirements::insert(const UseFlagName & u, UseFlagState s)
UseFlagState
UseRequirements::state(const UseFlagName & u) const
{
- Iterator i(find(u));
+ ConstIterator i(find(u));
if (end() == i)
return use_unspecified;
return i->second;
@@ -1104,17 +1104,17 @@ LabelsDepSpec<T_>::clone() const
}
template <typename T_>
-typename LabelsDepSpec<T_>::Iterator
+typename LabelsDepSpec<T_>::ConstIterator
LabelsDepSpec<T_>::begin() const
{
- return Iterator(indirect_iterator(_imp->items.begin()));
+ return ConstIterator(indirect_iterator(_imp->items.begin()));
}
template <typename T_>
-typename LabelsDepSpec<T_>::Iterator
+typename LabelsDepSpec<T_>::ConstIterator
LabelsDepSpec<T_>::end() const
{
- return Iterator(indirect_iterator(_imp->items.end()));
+ return ConstIterator(indirect_iterator(_imp->items.end()));
}
template <typename T_>
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 8c63f48..2d247f9 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -221,15 +221,15 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<UseRequirements,
- const std::pair<const UseFlagName, UseFlagState> > Iterator;
+ const std::pair<const UseFlagName, UseFlagState> > ConstIterator;
- Iterator begin() const;
- Iterator end() const;
+ ConstIterator begin() const;
+ ConstIterator end() const;
///\}
/// Find the requirement for a particular USE flag.
- Iterator find(const UseFlagName & u) const
+ ConstIterator find(const UseFlagName & u) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/// Insert a new requirement.
@@ -487,9 +487,9 @@ namespace paludis
///\{
void add_label(const tr1::shared_ptr<const typename SpecTree_::BasicNode> &);
- typedef libwrapiter::ForwardIterator<LabelsDepSpec<SpecTree_>, const typename SpecTree_::BasicNode> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<LabelsDepSpec<SpecTree_>, const typename SpecTree_::BasicNode> ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/dep_spec_flattener.cc b/paludis/dep_spec_flattener.cc
index 8f7916a..eac8fc6 100644
--- a/paludis/dep_spec_flattener.cc
+++ b/paludis/dep_spec_flattener.cc
@@ -71,16 +71,16 @@ DepSpecFlattener::~DepSpecFlattener()
{
}
-DepSpecFlattener::Iterator
+DepSpecFlattener::ConstIterator
DepSpecFlattener::begin() const
{
- return Iterator(_imp->specs.begin());
+ return ConstIterator(_imp->specs.begin());
}
-DepSpecFlattener::Iterator
+DepSpecFlattener::ConstIterator
DepSpecFlattener::end() const
{
- return Iterator(_imp->specs.end());
+ return ConstIterator(_imp->specs.end());
}
void DepSpecFlattener::visit_sequence(const UseDepSpec & u,
diff --git a/paludis/dep_spec_flattener.hh b/paludis/dep_spec_flattener.hh
index c1177dd..e5ff577 100644
--- a/paludis/dep_spec_flattener.hh
+++ b/paludis/dep_spec_flattener.hh
@@ -86,11 +86,11 @@ namespace paludis
///\name Iterate over our dep specs
///{
- typedef libwrapiter::ForwardIterator<DepSpecFlattener, const tr1::shared_ptr<const StringDepSpec> > Iterator;
+ typedef libwrapiter::ForwardIterator<DepSpecFlattener, const tr1::shared_ptr<const StringDepSpec> > ConstIterator;
- Iterator begin() const;
+ ConstIterator begin() const;
- Iterator end() const;
+ ConstIterator end() const;
///\}
};
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index 8718ff8..771e098 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -76,7 +76,7 @@ EnvironmentImplementation::default_destinations() const
{
tr1::shared_ptr<DestinationsSet> result(new DestinationsSet);
- for (PackageDatabase::RepositoryIterator r(package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(package_database()->begin_repositories()),
r_end(package_database()->end_repositories()) ;
r != r_end ; ++r)
if ((*r)->destination_interface)
@@ -107,7 +107,7 @@ EnvironmentImplementation::set(const SetName & s) const
result.reset(new ConstTreeSequence<SetSpecTree, AllDepSpec>(tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
}
- for (PackageDatabase::RepositoryIterator r(package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(package_database()->begin_repositories()),
r_end(package_database()->end_repositories()) ;
r != r_end ; ++r)
{
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index 4edc812..a214ff2 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -245,7 +245,7 @@ void
NoConfigEnvironment::set_accept_unstable(const bool value)
{
_imp->accept_unstable = value;
- for (PackageDatabase::RepositoryIterator it(_imp->package_database->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator it(_imp->package_database->begin_repositories()),
it_end(_imp->package_database->end_repositories());
it_end != it; ++it)
(*it)->invalidate_masks();
@@ -332,7 +332,7 @@ NoConfigEnvironment::accept_keywords(tr1::shared_ptr<const KeywordNameSet> keywo
WhitespaceTokeniser::get_instance()->tokenise(ak,
create_inserter<KeywordName>(std::back_inserter(accepted)));
- for (KeywordNameSet::Iterator k(keywords->begin()), k_end(keywords->end()) ;
+ for (KeywordNameSet::ConstIterator k(keywords->begin()), k_end(keywords->end()) ;
k != k_end ; ++k)
{
if (accepted.end() != std::find(accepted.begin(), accepted.end(), *k))
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index ba9f936..5e9d427 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -86,7 +86,7 @@ KeywordsConf::add(const FSEntry & filename)
if (! f)
return;
- for (LineConfigFile::Iterator line(f->begin()), line_end(f->end()) ;
+ for (LineConfigFile::ConstIterator line(f->begin()), line_end(f->end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 0e1144f..6963d45 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -84,7 +84,7 @@ LicensesConf::add(const FSEntry & filename)
if (! f)
return;
- for (LineConfigFile::Iterator line(f->begin()), line_end(f->end()) ;
+ for (LineConfigFile::ConstIterator line(f->begin()), line_end(f->end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
diff --git a/paludis/environments/paludis/mirrors_conf.cc b/paludis/environments/paludis/mirrors_conf.cc
index 06db653..794acb4 100644
--- a/paludis/environments/paludis/mirrors_conf.cc
+++ b/paludis/environments/paludis/mirrors_conf.cc
@@ -70,7 +70,7 @@ MirrorsConf::add(const FSEntry & filename)
if (! f)
return;
- for (LineConfigFile::Iterator line(f->begin()), line_end(f->end()) ;
+ for (LineConfigFile::ConstIterator line(f->begin()), line_end(f->end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc
index 1f3bd4c..f087433 100644
--- a/paludis/environments/paludis/package_mask_conf.cc
+++ b/paludis/environments/paludis/package_mask_conf.cc
@@ -71,7 +71,7 @@ PackageMaskConf::add(const FSEntry & filename)
if (! f)
return;
- for (LineConfigFile::Iterator line(f->begin()), line_end(f->end()) ;
+ for (LineConfigFile::ConstIterator line(f->begin()), line_end(f->end()) ;
line != line_end ; ++line)
_imp->masks.push_back(tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(*line, pds_pm_unspecific)));
}
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 228628f..a52d499 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -558,16 +558,16 @@ PaludisConfig::bashrc_files() const
return _imp->bashrc_files;
}
-PaludisConfig::RepositoryIterator
+PaludisConfig::RepositoryConstIterator
PaludisConfig::begin_repositories() const
{
- return RepositoryIterator(_imp->repos.begin());
+ return RepositoryConstIterator(_imp->repos.begin());
}
-PaludisConfig::RepositoryIterator
+PaludisConfig::RepositoryConstIterator
PaludisConfig::end_repositories() const
{
- return RepositoryIterator(_imp->repos.end());
+ return RepositoryConstIterator(_imp->repos.end());
}
std::string
diff --git a/paludis/environments/paludis/paludis_config.hh b/paludis/environments/paludis/paludis_config.hh
index 4d62ca2..004cf85 100644
--- a/paludis/environments/paludis/paludis_config.hh
+++ b/paludis/environments/paludis/paludis_config.hh
@@ -124,11 +124,11 @@ namespace paludis
///\name Iterate over our repositories
///\{
- typedef libwrapiter::ForwardIterator<PaludisConfig, const RepositoryConfigEntry> RepositoryIterator;
+ typedef libwrapiter::ForwardIterator<PaludisConfig, const RepositoryConfigEntry> RepositoryConstIterator;
- RepositoryIterator begin_repositories() const;
+ RepositoryConstIterator begin_repositories() const;
- RepositoryIterator end_repositories() const;
+ RepositoryConstIterator end_repositories() const;
///\}
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 67702f2..3cd13ca 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -127,14 +127,14 @@ PaludisEnvironment::PaludisEnvironment(const std::string & s) :
{
Context context("When loading paludis environment:");
- for (PaludisConfig::RepositoryIterator r(_imp->config->begin_repositories()),
+ for (PaludisConfig::RepositoryConstIterator r(_imp->config->begin_repositories()),
r_end(_imp->config->end_repositories()) ; r != r_end ; ++r)
{
std::string keys;
if (Log::get_instance()->log_level() <= ll_debug)
{
if (r->keys)
- for (Map<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::ConstIterator
i(r->keys->begin()), i_end(r->keys->end()) ; i != i_end ; ++i)
{
if (! keys.empty())
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index 4193fc1..26f8796 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -88,7 +88,7 @@ UseConf::add(const FSEntry & filename)
if (! f)
return;
- for (LineConfigFile::Iterator line(f->begin()), line_end(f->end()) ;
+ for (LineConfigFile::ConstIterator line(f->begin()), line_end(f->end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
@@ -202,7 +202,7 @@ UseConf::query(const UseFlagName & f, const PackageID & e) const
if (e.repository()->use_interface)
{
tr1::shared_ptr<const UseFlagNameSet> prefixes(e.repository()->use_interface->use_expand_prefixes());
- for (UseFlagNameSet::Iterator p(prefixes->begin()), p_end(prefixes->end()) ;
+ for (UseFlagNameSet::ConstIterator p(prefixes->begin()), p_end(prefixes->end()) ;
p != p_end ; ++p)
if (0 == p->data().compare(0, p->data().length(), stringify(f), 0, p->data().length()))
{
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index a2533b8..53aa44a 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -242,7 +242,7 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
if ((_imp->conf_dir / "portage" / "mirrors").exists())
{
LineConfigFile m(_imp->conf_dir / "portage" / "mirrors", LineConfigFileOptions());
- for (LineConfigFile::Iterator line(m.begin()), line_end(m.end()) ;
+ for (LineConfigFile::ConstIterator line(m.begin()), line_end(m.end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
@@ -276,7 +276,7 @@ PortageEnvironment::_load_atom_file(const FSEntry & f, I_ i, const std::string &
else
{
LineConfigFile file(f, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(file.begin()), line_end(file.end()) ;
+ for (LineConfigFile::ConstIterator line(file.begin()), line_end(file.end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
@@ -320,7 +320,7 @@ PortageEnvironment::_load_lined_file(const FSEntry & f, I_ i)
else
{
LineConfigFile file(f, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(file.begin()), line_end(file.end()) ;
+ for (LineConfigFile::ConstIterator line(file.begin()), line_end(file.end()) ;
line != line_end ; ++line)
*i++ = tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
strip_trailing(strip_leading(*line, " \t"), " \t"), pds_pm_permissive));
@@ -337,7 +337,7 @@ PortageEnvironment::_load_profile(const FSEntry & d)
Context context_local("When loading parent profiles:");
LineConfigFile f(d / "parent", LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_disallow_comments);
- for (LineConfigFile::Iterator line(f.begin()), line_end(f.end()) ;
+ for (LineConfigFile::ConstIterator line(f.begin()), line_end(f.end()) ;
line != line_end ; ++line)
_load_profile((d / *line).realpath());
}
@@ -514,7 +514,7 @@ PortageEnvironment::accept_keywords(tr1::shared_ptr <const KeywordNameSet> keywo
if (keywords->end() != keywords->find(KeywordName("*")))
return true;
- for (KeywordNameSet::Iterator k(keywords->begin()), k_end(keywords->end()) ;
+ for (KeywordNameSet::ConstIterator k(keywords->begin()), k_end(keywords->end()) ;
k != k_end ; ++k)
{
bool local_result(false);
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 5763bdb..38ba5c2 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -106,7 +106,7 @@ TestEnvironment::fetch_package_id(const QualifiedPackageName & q,
using namespace tr1::placeholders;
tr1::shared_ptr<const PackageIDSequence> ids(package_database()->fetch_repository(r)->package_ids(q));
- PackageIDSequence::Iterator i(std::find_if(ids->begin(), ids->end(),
+ PackageIDSequence::ConstIterator i(std::find_if(ids->begin(), ids->end(),
tr1::bind(std::equal_to<VersionSpec>(), tr1::bind(tr1::mem_fn(&PackageID::version), _1), v)));
if (i == ids->end())
throw NoSuchPackageError(stringify(q) + "-" + stringify(v) + "::" + stringify(r));
diff --git a/paludis/hook.cc b/paludis/hook.cc
index 94e5f83..22f7b7d 100644
--- a/paludis/hook.cc
+++ b/paludis/hook.cc
@@ -133,16 +133,16 @@ Hook::validate_value(const std::string & v) const
return (_imp->allowed_values.find(v) != _imp->allowed_values.end());
}
-Hook::Iterator
+Hook::ConstIterator
Hook::begin() const
{
- return Iterator(_imp->extra_env.begin());
+ return ConstIterator(_imp->extra_env.begin());
}
-Hook::Iterator
+Hook::ConstIterator
Hook::end() const
{
- return Iterator(_imp->extra_env.end());
+ return ConstIterator(_imp->extra_env.end());
}
std::string
diff --git a/paludis/hook.hh b/paludis/hook.hh
index 2efbbb9..78beb0f 100644
--- a/paludis/hook.hh
+++ b/paludis/hook.hh
@@ -76,12 +76,12 @@ namespace paludis
///\name Iterate over environment data
///\{
- typedef libwrapiter::ForwardIterator<Hook, const std::pair<const std::string, std::string> > Iterator;
+ typedef libwrapiter::ForwardIterator<Hook, const std::pair<const std::string, std::string> > ConstIterator;
- Iterator begin() const
+ ConstIterator begin() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const
+ ConstIterator end() const
PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/hooker.cc b/paludis/hooker.cc
index 3e6ba10..6e4ce34 100644
--- a/paludis/hooker.cc
+++ b/paludis/hooker.cc
@@ -148,7 +148,7 @@ BashHookFile::run(const Hook & hook) const
.with_stdout_prefix(strip_trailing_string(file_name().basename(), ".bash") + "> ")
.with_stderr_prefix(strip_trailing_string(file_name().basename(), ".bash") + "> ");
- for (Hook::Iterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
+ for (Hook::ConstIterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
cmd.with_setenv(x->first, x->second);
int exit_status(0);
@@ -199,7 +199,7 @@ FancyHookFile::run(const Hook & hook) const
.with_stdout_prefix(strip_trailing_string(file_name().basename(), ".hook") + "> ")
.with_stderr_prefix(strip_trailing_string(file_name().basename(), ".hook") + "> ");
- for (Hook::Iterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
+ for (Hook::ConstIterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
cmd.with_setenv(x->first, x->second);
int exit_status(0);
@@ -258,7 +258,7 @@ FancyHookFile::_add_dependency_class(const Hook & hook, DirectedGraph<std::strin
cmd.with_stderr_prefix(strip_trailing_string(file_name().basename(), ".bash") + "> ");
- for (Hook::Iterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
+ for (Hook::ConstIterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
cmd.with_setenv(x->first, x->second);
PStream s(cmd);
@@ -415,7 +415,7 @@ Hooker::perform_hook(const Hook & hook) const
switch (hook.output_dest)
{
case hod_stdout:
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
if ((*r)->hook_interface)
result.max_exit_status = std::max(result.max_exit_status,
@@ -423,7 +423,7 @@ Hooker::perform_hook(const Hook & hook) const
continue;
case hod_grab:
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
if ((*r)->hook_interface)
{
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index 963f9a8..4acaf43 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -48,7 +48,7 @@ paludis::match_package(
switch (spec.version_requirements_mode())
{
case vr_and:
- for (VersionRequirements::Iterator r(spec.version_requirements_ptr()->begin()),
+ for (VersionRequirements::ConstIterator r(spec.version_requirements_ptr()->begin()),
r_end(spec.version_requirements_ptr()->end()) ; r != r_end ; ++r)
if (! r->version_operator.as_version_spec_comparator()(entry.version(), r->version_spec))
return false;
@@ -57,7 +57,7 @@ paludis::match_package(
case vr_or:
{
bool matched(false);
- for (VersionRequirements::Iterator r(spec.version_requirements_ptr()->begin()),
+ for (VersionRequirements::ConstIterator r(spec.version_requirements_ptr()->begin()),
r_end(spec.version_requirements_ptr()->end()) ; r != r_end ; ++r)
if (r->version_operator.as_version_spec_comparator()(entry.version(), r->version_spec))
{
@@ -84,7 +84,7 @@ paludis::match_package(
if (spec.use_requirements_ptr())
{
- for (UseRequirements::Iterator u(spec.use_requirements_ptr()->begin()),
+ for (UseRequirements::ConstIterator u(spec.use_requirements_ptr()->begin()),
u_end(spec.use_requirements_ptr()->end()) ; u != u_end ; ++u)
{
switch (u->second)
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 27ef9c8..36679b2 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -137,16 +137,16 @@ AmbiguousPackageNameError::~AmbiguousPackageNameError() throw ()
delete _name_data;
}
-AmbiguousPackageNameError::OptionsIterator
+AmbiguousPackageNameError::OptionsConstIterator
AmbiguousPackageNameError::begin_options() const
{
- return OptionsIterator(_name_data->names.begin());
+ return OptionsConstIterator(_name_data->names.begin());
}
-AmbiguousPackageNameError::OptionsIterator
+AmbiguousPackageNameError::OptionsConstIterator
AmbiguousPackageNameError::end_options() const
{
- return OptionsIterator(_name_data->names.end());
+ return OptionsConstIterator(_name_data->names.end());
}
const std::string &
@@ -195,7 +195,7 @@ PackageDatabase::add_repository(int i, const tr1::shared_ptr<Repository> r)
{
Context c("When adding a repository named '" + stringify(r->name()) + "':");
- for (IndirectIterator<RepositoryIterator> r_c(begin_repositories()), r_end(end_repositories()) ;
+ for (IndirectIterator<RepositoryConstIterator> r_c(begin_repositories()), r_end(end_repositories()) ;
r_c != r_end ; ++r_c)
if (r_c->name() == r->name())
throw DuplicateRepositoryError(stringify(r->name()));
@@ -221,13 +221,13 @@ PackageDatabase::fetch_unique_qualified_package_name(
tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
- for (IndirectIterator<RepositoryIterator> r(begin_repositories()), r_end(end_repositories()) ;
+ for (IndirectIterator<RepositoryConstIterator> r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
{
Context local_context("When looking in repository '" + stringify(r->name()) + "':");
tr1::shared_ptr<const CategoryNamePartSet> cats(r->category_names_containing_package(p));
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
result->insert(*c + p);
}
@@ -251,7 +251,7 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
if (! repos)
{
repos.reset(new RepositoryNameSequence);
- for (RepositoryIterator r(begin_repositories()), r_end(end_repositories()) ;
+ for (RepositoryConstIterator r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
repos->push_back((*r)->name());
}
@@ -265,7 +265,7 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
if (! cats)
{
cats.reset(new CategoryNamePartSet);
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
tr1::shared_ptr<const CategoryNamePartSet> local_cats(fetch_repository(*r)->category_names());
@@ -282,9 +282,9 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
if (! pkgs)
{
pkgs.reset(new QualifiedPackageNameSet);
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> local_pkgs(fetch_repository(*r)->package_names(*c));
@@ -300,9 +300,9 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
tr1::shared_ptr<PackageIDSequence> ids(q.ids(*_imp->environment, repos, pkgs));
if (! ids)
{
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> local_ids(fetch_repository(*r)->package_ids(*p));
@@ -365,7 +365,7 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
{
std::map<QualifiedPackageName, tr1::shared_ptr<const PackageID> > best;
PackageIDComparator c(this);
- for (PackageIDSequence::Iterator r(result->begin()), r_end(result->end()) ;
+ for (PackageIDSequence::ConstIterator r(result->begin()), r_end(result->end()) ;
r != r_end ; ++r)
{
std::pair<std::map<QualifiedPackageName, tr1::shared_ptr<const PackageID> >::iterator, bool> p(
@@ -384,7 +384,7 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
{
std::map<std::pair<QualifiedPackageName, SlotName>, tr1::shared_ptr<const PackageID> > best;
PackageIDComparator c(this);
- for (PackageIDSequence::Iterator r(result->begin()), r_end(result->end()) ;
+ for (PackageIDSequence::ConstIterator r(result->begin()), r_end(result->end()) ;
r != r_end ; ++r)
{
std::pair<std::map<std::pair<QualifiedPackageName, SlotName>, tr1::shared_ptr<const PackageID> >::iterator, bool> p(
@@ -425,7 +425,7 @@ PackageDatabase::query(const Query & q, const QueryOrder query_order) const
tr1::shared_ptr<const Repository>
PackageDatabase::fetch_repository(const RepositoryName & n) const
{
- for (RepositoryIterator r(begin_repositories()), r_end(end_repositories()) ;
+ for (RepositoryConstIterator r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
if ((*r)->name() == n)
return *r;
@@ -436,7 +436,7 @@ PackageDatabase::fetch_repository(const RepositoryName & n) const
tr1::shared_ptr<Repository>
PackageDatabase::fetch_repository(const RepositoryName & n)
{
- for (RepositoryIterator r(begin_repositories()), r_end(end_repositories()) ;
+ for (RepositoryConstIterator r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
if ((*r)->name() == n)
return *r;
@@ -447,7 +447,7 @@ PackageDatabase::fetch_repository(const RepositoryName & n)
bool
PackageDatabase::has_repository_named(const RepositoryName & n) const
{
- for (RepositoryIterator r(begin_repositories()), r_end(end_repositories()) ;
+ for (RepositoryConstIterator r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
if ((*r)->name() == n)
return true;
@@ -458,7 +458,7 @@ PackageDatabase::has_repository_named(const RepositoryName & n) const
RepositoryName
PackageDatabase::favourite_repository() const
{
- for (RepositoryIterator r(begin_repositories()), r_end(end_repositories()) ;
+ for (RepositoryConstIterator r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
if ((*r)->can_be_favourite_repository())
return (*r)->name();
@@ -472,7 +472,7 @@ PackageDatabase::more_important_than(const RepositoryName & lhs,
{
std::map<std::string, int> rank;
int x(0);
- for (PackageDatabase::RepositoryIterator r(begin_repositories()), r_end(end_repositories()) ;
+ for (PackageDatabase::RepositoryConstIterator r(begin_repositories()), r_end(end_repositories()) ;
r != r_end ; ++r)
rank.insert(std::make_pair(stringify((*r)->name()), ++x));
@@ -487,15 +487,15 @@ PackageDatabase::more_important_than(const RepositoryName & lhs,
return l->second > r->second;
}
-PackageDatabase::RepositoryIterator
+PackageDatabase::RepositoryConstIterator
PackageDatabase::begin_repositories() const
{
- return RepositoryIterator(_imp->repositories.begin());
+ return RepositoryConstIterator(_imp->repositories.begin());
}
-PackageDatabase::RepositoryIterator
+PackageDatabase::RepositoryConstIterator
PackageDatabase::end_repositories() const
{
- return RepositoryIterator(_imp->repositories.end());
+ return RepositoryConstIterator(_imp->repositories.end());
}
diff --git a/paludis/package_database.hh b/paludis/package_database.hh
index 913f5fe..4c8a927 100644
--- a/paludis/package_database.hh
+++ b/paludis/package_database.hh
@@ -117,10 +117,10 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<AmbiguousPackageNameError,
- const std::string> OptionsIterator;
+ const std::string> OptionsConstIterator;
- OptionsIterator begin_options() const PALUDIS_ATTRIBUTE((warn_unused_result));
- OptionsIterator end_options() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ OptionsConstIterator begin_options() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ OptionsConstIterator end_options() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
};
@@ -308,12 +308,12 @@ namespace paludis
///\name Iterate over our repositories
///\{
- typedef libwrapiter::ForwardIterator<PackageDatabase, const tr1::shared_ptr<Repository> > RepositoryIterator;
+ typedef libwrapiter::ForwardIterator<PackageDatabase, const tr1::shared_ptr<Repository> > RepositoryConstIterator;
- RepositoryIterator begin_repositories() const
+ RepositoryConstIterator begin_repositories() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- RepositoryIterator end_repositories() const
+ RepositoryConstIterator end_repositories() const
PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/package_id.cc b/paludis/package_id.cc
index 0707b7f..301f5ab 100644
--- a/paludis/package_id.cc
+++ b/paludis/package_id.cc
@@ -76,18 +76,18 @@ PackageID::add_metadata_key(const tr1::shared_ptr<const MetadataKey> & k) const
_imp->keys.push_back(k);
}
-PackageID::MetadataIterator
+PackageID::MetadataConstIterator
PackageID::begin_metadata() const
{
need_keys_added();
- return MetadataIterator(_imp->keys.begin());
+ return MetadataConstIterator(_imp->keys.begin());
}
-PackageID::MetadataIterator
+PackageID::MetadataConstIterator
PackageID::end_metadata() const
{
need_keys_added();
- return MetadataIterator(_imp->keys.end());
+ return MetadataConstIterator(_imp->keys.end());
}
void
@@ -96,18 +96,18 @@ PackageID::add_mask(const tr1::shared_ptr<const Mask> & k) const
_imp->masks.push_back(k);
}
-PackageID::MasksIterator
+PackageID::MasksConstIterator
PackageID::begin_masks() const
{
need_masks_added();
- return MasksIterator(_imp->masks.begin());
+ return MasksConstIterator(_imp->masks.begin());
}
-PackageID::MasksIterator
+PackageID::MasksConstIterator
PackageID::end_masks() const
{
need_masks_added();
- return MasksIterator(_imp->masks.end());
+ return MasksConstIterator(_imp->masks.end());
}
bool
@@ -122,7 +122,7 @@ PackageID::invalidate_masks() const
_imp->masks.clear();
}
-PackageID::MetadataIterator
+PackageID::MetadataConstIterator
PackageID::find_metadata(const std::string & s) const
{
using namespace tr1::placeholders;
@@ -187,7 +187,7 @@ PackageIDComparator::PackageIDComparator(const PackageDatabase * const db) :
PrivateImplementationPattern<PackageIDComparator>(new Implementation<PackageIDComparator>)
{
unsigned c(0);
- for (PackageDatabase::RepositoryIterator r(db->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(db->begin_repositories()),
r_end(db->end_repositories()) ; r != r_end ; ++r)
_imp->m.insert(std::make_pair((*r)->name(), ++c));
}
diff --git a/paludis/package_id.hh b/paludis/package_id.hh
index df2a667..3eecf76 100644
--- a/paludis/package_id.hh
+++ b/paludis/package_id.hh
@@ -94,10 +94,10 @@ namespace paludis
///\name Finding and iterating over metadata keys
///\{
- typedef libwrapiter::ForwardIterator<PackageID, tr1::shared_ptr<const MetadataKey> > MetadataIterator;
- MetadataIterator begin_metadata() const PALUDIS_ATTRIBUTE((warn_unused_result));
- MetadataIterator end_metadata() const PALUDIS_ATTRIBUTE((warn_unused_result));
- MetadataIterator find_metadata(const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<PackageID, tr1::shared_ptr<const MetadataKey> > MetadataConstIterator;
+ MetadataConstIterator begin_metadata() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ MetadataConstIterator end_metadata() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ MetadataConstIterator find_metadata(const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
@@ -112,9 +112,9 @@ namespace paludis
///\name Masks
///\{
- typedef libwrapiter::ForwardIterator<PackageID, tr1::shared_ptr<const Mask> > MasksIterator;
- MasksIterator begin_masks() const PALUDIS_ATTRIBUTE((warn_unused_result));
- MasksIterator end_masks() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<PackageID, tr1::shared_ptr<const Mask> > MasksConstIterator;
+ MasksConstIterator begin_masks() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ MasksConstIterator end_masks() const PALUDIS_ATTRIBUTE((warn_unused_result));
bool masked() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void invalidate_masks() const;
diff --git a/paludis/python_hooks.cc b/paludis/python_hooks.cc
index be68e43..93d3afd 100644
--- a/paludis/python_hooks.cc
+++ b/paludis/python_hooks.cc
@@ -185,7 +185,7 @@ PyHookFile::run(const Hook & hook) const
hook_env["HOOK"] = hook.name();
hook_env["HOOK_FILE"] = stringify(file_name());
- for (Hook::Iterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
+ for (Hook::ConstIterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
hook_env[x->first] = x->second;
bp::object result;
@@ -276,7 +276,7 @@ PyHookFile::_add_dependency_class(const Hook & hook, DirectedGraph<std::string,
hook_env["HOOK"] = hook.name();
hook_env["HOOK_FILE"] = stringify(file_name());
- for (Hook::Iterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
+ for (Hook::ConstIterator x(hook.begin()), x_end(hook.end()) ; x != x_end ; ++x)
hook_env[x->first] = x->second;
bp::object result;
diff --git a/paludis/query.cc b/paludis/query.cc
index 1b8757e..e87b944 100644
--- a/paludis/query.cc
+++ b/paludis/query.cc
@@ -104,7 +104,7 @@ namespace
{
tr1::shared_ptr<RepositoryNameSequence> result(new RepositoryNameSequence);
- for (PackageDatabase::RepositoryIterator i(e.package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator i(e.package_database()->begin_repositories()),
i_end(e.package_database()->end_repositories()) ; i != i_end ; ++i)
if ((*i)->name() == *spec.repository_ptr())
{
@@ -154,9 +154,9 @@ namespace
{
tr1::shared_ptr<QualifiedPackageNameSet> result(
new QualifiedPackageNameSet);
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
if (e.package_database()->fetch_repository(*r)->has_package_named(*c +
*spec.package_name_part_ptr()))
@@ -173,17 +173,17 @@ namespace
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs) const
{
tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
tr1::shared_ptr<const Repository> repo(e.package_database()->fetch_repository(*r));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
using namespace tr1::placeholders;
tr1::shared_ptr<const PackageIDSequence> i(repo->package_ids(*p));
- for (PackageIDSequence::Iterator v(i->begin()), v_end(i->end()) ;
+ for (PackageIDSequence::ConstIterator v(i->begin()), v_end(i->end()) ;
v != v_end ; ++v)
if (match_package(e, spec, **v))
result->push_back(*v);
@@ -242,16 +242,16 @@ namespace
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs) const
{
tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
tr1::shared_ptr<const Repository> repo(e.package_database()->fetch_repository(*r));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> i(repo->package_ids(*p));
- for (PackageIDSequence::Iterator v(i->begin()), v_end(i->end()) ;
+ for (PackageIDSequence::ConstIterator v(i->begin()), v_end(i->end()) ;
v != v_end ; ++v)
if (! ((*v)->masked()))
result->push_back(*v);
@@ -291,7 +291,7 @@ namespace
{
tr1::shared_ptr<RepositoryNameSequence> result(new RepositoryNameSequence);
- for (PackageDatabase::RepositoryIterator i(e.package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator i(e.package_database()->begin_repositories()),
i_end(e.package_database()->end_repositories()) ; i != i_end ; ++i)
if ((*i)->installed_interface)
if (root == (*i)->installed_interface->root())
@@ -524,7 +524,7 @@ namespace
tr1::shared_ptr<RepositoryNameSequence> result(new RepositoryNameSequence);
- for (PackageDatabase::RepositoryIterator i(e.package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator i(e.package_database()->begin_repositories()),
i_end(e.package_database()->end_repositories()) ; i != i_end ; ++i)
if ((*i)->some_ids_might_support_action(t))
result->push_back((*i)->name());
@@ -540,16 +540,16 @@ namespace
SupportsActionTest<T_> t;
tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
tr1::shared_ptr<const Repository> repo(e.package_database()->fetch_repository(*r));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> i(repo->package_ids(*p));
- for (PackageIDSequence::Iterator v(i->begin()), v_end(i->end()) ;
+ for (PackageIDSequence::ConstIterator v(i->begin()), v_end(i->end()) ;
v != v_end ; ++v)
if ((*v)->supports_action(t))
result->push_back(*v);
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 548c324..9170ad9 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -225,7 +225,7 @@ CRANRepository::need_ids() const
Log::get_instance()->message(ll_warning, lc_context) << "Couldn't insert package '" << *id << "' due to name collision";
if (id->contains_key())
- for (PackageIDSequence::Iterator i(id->contains_key()->value()->begin()),
+ for (PackageIDSequence::ConstIterator i(id->contains_key()->value()->begin()),
i_end(id->contains_key()->value()->end()) ; i != i_end ; ++i)
if (! _imp->ids.insert(std::make_pair((*i)->name(),
tr1::static_pointer_cast<const cranrepository::CRANPackageID>(*i))).second)
diff --git a/paludis/repositories/e/aa_visitor.cc b/paludis/repositories/e/aa_visitor.cc
index 8949d53..60ab723 100644
--- a/paludis/repositories/e/aa_visitor.cc
+++ b/paludis/repositories/e/aa_visitor.cc
@@ -77,15 +77,15 @@ AAVisitor::visit_leaf(const LabelsDepSpec<URILabelVisitorTypes> &)
{
}
-AAVisitor::Iterator
+AAVisitor::ConstIterator
AAVisitor::begin() const
{
- return Iterator(_imp->aa.begin());
+ return ConstIterator(_imp->aa.begin());
}
-AAVisitor::Iterator
+AAVisitor::ConstIterator
AAVisitor::end() const
{
- return Iterator(_imp->aa.end());
+ return ConstIterator(_imp->aa.end());
}
diff --git a/paludis/repositories/e/aa_visitor.hh b/paludis/repositories/e/aa_visitor.hh
index 22dbe67..5707efb 100644
--- a/paludis/repositories/e/aa_visitor.hh
+++ b/paludis/repositories/e/aa_visitor.hh
@@ -71,11 +71,11 @@ namespace paludis
/// \name Iterator functions
///{
-
- typedef libwrapiter::ForwardIterator<AAVisitor, const std::string> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<AAVisitor, const std::string> ConstIterator;
+
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///}
};
diff --git a/paludis/repositories/e/check_fetched_files_visitor.cc b/paludis/repositories/e/check_fetched_files_visitor.cc
index ebd4bad..27fa012 100644
--- a/paludis/repositories/e/check_fetched_files_visitor.cc
+++ b/paludis/repositories/e/check_fetched_files_visitor.cc
@@ -203,7 +203,7 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile)
bool found(false);
- for (Manifest2Reader::Iterator m(_imp->m2r->begin()), m_end(_imp->m2r->end()) ;
+ for (Manifest2Reader::ConstIterator m(_imp->m2r->begin()), m_end(_imp->m2r->end()) ;
m != m_end ; ++m)
{
if (distfile.basename() != m->name)
diff --git a/paludis/repositories/e/dep_lexer.cc b/paludis/repositories/e/dep_lexer.cc
index c1cd980..04ee6fe 100644
--- a/paludis/repositories/e/dep_lexer.cc
+++ b/paludis/repositories/e/dep_lexer.cc
@@ -104,15 +104,15 @@ DepLexer::~DepLexer()
{
}
-DepLexer::Iterator
+DepLexer::ConstIterator
DepLexer::begin() const
{
- return Iterator(_imp->tokens.begin());
+ return ConstIterator(_imp->tokens.begin());
}
-DepLexer::Iterator
+DepLexer::ConstIterator
DepLexer::end() const
{
- return Iterator(_imp->tokens.end());
+ return ConstIterator(_imp->tokens.end());
}
diff --git a/paludis/repositories/e/dep_lexer.hh b/paludis/repositories/e/dep_lexer.hh
index 91d2f0f..553e227 100644
--- a/paludis/repositories/e/dep_lexer.hh
+++ b/paludis/repositories/e/dep_lexer.hh
@@ -107,11 +107,11 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<DepLexer,
- const std::pair<DepLexerLexeme, std::string> > Iterator;
+ const std::pair<DepLexerLexeme, std::string> > ConstIterator;
- Iterator begin() const;
+ ConstIterator begin() const;
- Iterator end() const;
+ ConstIterator end() const;
///\}
diff --git a/paludis/repositories/e/dep_lexer_TEST.cc b/paludis/repositories/e/dep_lexer_TEST.cc
index 5c618b7..e050bba 100644
--- a/paludis/repositories/e/dep_lexer_TEST.cc
+++ b/paludis/repositories/e/dep_lexer_TEST.cc
@@ -45,7 +45,7 @@ namespace test_cases
void run()
{
DepLexer l("");
- DepLexer::Iterator i(l.begin());
+ DepLexer::ConstIterator i(l.begin());
TEST_CHECK(i == l.end());
}
} test_dep_spec_parser_lexer_empty;
@@ -61,7 +61,7 @@ namespace test_cases
void run()
{
DepLexer l(" \n \t");
- DepLexer::Iterator i(l.begin());
+ DepLexer::ConstIterator i(l.begin());
TEST_CHECK(i != l.end());
TEST_CHECK_EQUAL(i->first, dpl_whitespace);
TEST_CHECK_EQUAL(i->second, " \n \t");
@@ -80,7 +80,7 @@ namespace test_cases
void run()
{
DepLexer l("app-editors/vim");
- DepLexer::Iterator i(l.begin());
+ DepLexer::ConstIterator i(l.begin());
TEST_CHECK(i != l.end());
TEST_CHECK_EQUAL(i->first, dpl_text);
TEST_CHECK_EQUAL(i->second, "app-editors/vim");
@@ -99,7 +99,7 @@ namespace test_cases
void run()
{
DepLexer l("app-editors/vim app-misc/hilite \nsys-apps/findutils");
- DepLexer::Iterator i(l.begin());
+ DepLexer::ConstIterator i(l.begin());
TEST_CHECK(i != l.end());
TEST_CHECK_EQUAL(i->first, dpl_text);
@@ -136,7 +136,7 @@ namespace test_cases
void run()
{
DepLexer l("|| ( one/one two/two )");
- DepLexer::Iterator i(l.begin());
+ DepLexer::ConstIterator i(l.begin());
TEST_CHECK(i != l.end());
TEST_CHECK_EQUAL(i->first, dpl_double_bar);
@@ -189,7 +189,7 @@ namespace test_cases
void run()
{
DepLexer l("foo? ( one/one )");
- DepLexer::Iterator i(l.begin());
+ DepLexer::ConstIterator i(l.begin());
TEST_CHECK(i != l.end());
TEST_CHECK_EQUAL(i->first, dpl_use_flag);
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 34649b0..39d369f 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -312,7 +312,7 @@ namespace
std::string arrow_lhs;
DepParserState state(dps_initial);
DepLexer lexer(s);
- DepLexer::Iterator i(lexer.begin()), i_end(lexer.end());
+ DepLexer::ConstIterator i(lexer.begin()), i_end(lexer.end());
for ( ; i != i_end ; ++i)
{
@@ -338,7 +338,7 @@ namespace
if (i->second.empty())
throw DepStringParseError(i->second, "Empty text entry");
- DepLexer::Iterator i_fwd(next(i));
+ DepLexer::ConstIterator i_fwd(next(i));
if (i_fwd != i_end && i_fwd->first == dpl_whitespace && ++i_fwd != i_end
&& i_fwd->first == dpl_arrow)
{
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 807185f..a90b8da 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -546,7 +546,7 @@ EIUseKey::value() const
t != t_end ; ++t)
{
IUseFlag f(*t, _imp->id->eapi()->supported->iuse_flag_parse_mode, std::string::npos);
- for (UseFlagNameSet::Iterator p(prefixes->begin()), p_end(prefixes->end()) ;
+ for (UseFlagNameSet::ConstIterator p(prefixes->begin()), p_end(prefixes->end()) ;
p != p_end ; ++p)
if (0 == stringify(f.flag).compare(0, stringify(*p).length(), stringify(*p), 0, stringify(*p).length()))
f.prefix_delim_pos = stringify(*p).length();
@@ -584,7 +584,7 @@ EIUseKey::pretty_print_flat(const Formatter<IUseFlag> & f) const
{
std::string result;
std::multimap<std::string, IUseFlag> prefixes;
- for (IUseFlagSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (IUseFlagSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (std::string::npos != i->prefix_delim_pos)
@@ -633,7 +633,7 @@ EIUseKey::pretty_print_flat_with_comparison(
{
std::string result;
std::multimap<std::string, IUseFlag> prefixes;
- for (IUseFlagSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (IUseFlagSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (std::string::npos != i->prefix_delim_pos)
@@ -674,7 +674,7 @@ EIUseKey::pretty_print_flat_with_comparison(
else
{
using namespace tr1::placeholders;
- IUseFlagSet::Iterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
+ IUseFlagSet::ConstIterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
tr1::bind(std::equal_to<UseFlagName>(), i->flag, tr1::bind<const UseFlagName>(&IUseFlag::flag, _1))));
if (p == id->iuse_key()->value()->end())
@@ -721,7 +721,7 @@ EIUseKey::pretty_print_flat_with_comparison(
else
{
using namespace tr1::placeholders;
- IUseFlagSet::Iterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
+ IUseFlagSet::ConstIterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
tr1::bind(std::equal_to<UseFlagName>(), j->second.flag, tr1::bind<const UseFlagName>(&IUseFlag::flag, _1))));
if (p == id->iuse_key()->value()->end())
@@ -820,7 +820,7 @@ std::string
EKeywordsKey::pretty_print_flat(const Formatter<KeywordName> & f) const
{
std::string result;
- for (KeywordNameSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (KeywordNameSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
@@ -892,7 +892,7 @@ std::string
EUseKey::pretty_print_flat(const Formatter<UseFlagName> & f) const
{
std::string result;
- for (UseFlagNameSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (UseFlagNameSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 7237268..69b51da 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -216,7 +216,7 @@ namespace paludis
bool found_one(false);
tr1::shared_ptr<const FSEntrySequence> profiles_desc_files(layout->profiles_desc_files());
- for (FSEntrySequence::Iterator p(profiles_desc_files->begin()), p_end(profiles_desc_files->end()) ;
+ for (FSEntrySequence::ConstIterator p(profiles_desc_files->begin()), p_end(profiles_desc_files->end()) ;
p != p_end ; ++p)
{
if (! p->exists())
@@ -225,7 +225,7 @@ namespace paludis
found_one = true;
LineConfigFile f(*p, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(f.begin()), line_end(f.end()) ; line != line_end ; ++line)
+ for (LineConfigFile::ConstIterator line(f.begin()), line_end(f.end()) ; line != line_end ; ++line)
{
std::vector<std::string> tokens;
WhitespaceTokeniser::get_instance()->tokenise(*line,
@@ -395,7 +395,7 @@ ERepository::repository_masked(const PackageID & id) const
Context context("When querying repository mask for '" + stringify(id) + "':");
tr1::shared_ptr<const FSEntrySequence> repository_mask_files(_imp->layout->repository_mask_files());
- for (FSEntrySequence::Iterator p(repository_mask_files->begin()), p_end(repository_mask_files->end()) ;
+ for (FSEntrySequence::ConstIterator p(repository_mask_files->begin()), p_end(repository_mask_files->end()) ;
p != p_end ; ++p)
{
Context context_local("When reading '" + stringify(*p) + "':");
@@ -403,7 +403,7 @@ ERepository::repository_masked(const PackageID & id) const
if (p->exists())
{
erepository::MaskFile ff(*p, LineConfigFileOptions());
- for (erepository::MaskFile::Iterator line(ff.begin()), line_end(ff.end()) ;
+ for (erepository::MaskFile::ConstIterator line(ff.begin()), line_end(ff.end()) ;
line != line_end ; ++line)
{
try
@@ -474,7 +474,7 @@ ERepository::do_arch_flags() const
bool found_one(false);
tr1::shared_ptr<const FSEntrySequence> arch_list_files(_imp->layout->arch_list_files());
- for (FSEntrySequence::Iterator p(arch_list_files->begin()), p_end(arch_list_files->end()) ;
+ for (FSEntrySequence::ConstIterator p(arch_list_files->begin()), p_end(arch_list_files->end()) ;
p != p_end ; ++p)
{
if (! p->exists())
@@ -523,13 +523,13 @@ ERepository::need_mirrors() const
{
bool found_one(false);
tr1::shared_ptr<const FSEntrySequence> mirror_files(_imp->layout->mirror_files());
- for (FSEntrySequence::Iterator p(mirror_files->begin()), p_end(mirror_files->end()) ;
+ for (FSEntrySequence::ConstIterator p(mirror_files->begin()), p_end(mirror_files->end()) ;
p != p_end ; ++p)
{
if (p->exists())
{
LineConfigFile mirrors(*p, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(mirrors.begin()) ; line != mirrors.end() ; ++line)
+ for (LineConfigFile::ConstIterator line(mirrors.begin()) ; line != mirrors.end() ; ++line)
{
std::vector<std::string> ee;
WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(ee));
@@ -687,7 +687,7 @@ ERepository::info(bool verbose) const
tr1::shared_ptr<RepositoryInfo> result(new RepositoryInfo);
- for (RepositoryInfo::SectionIterator s(result_non_verbose->begin_sections()),
+ for (RepositoryInfo::SectionConstIterator s(result_non_verbose->begin_sections()),
s_end(result_non_verbose->end_sections()) ; s != s_end ; ++s)
result->add_section(*s);
@@ -765,18 +765,18 @@ ERepository::profile_variable(const std::string & s) const
return _imp->profile_ptr->environment_variable(s);
}
-ERepository::MirrorsIterator
+ERepository::MirrorsConstIterator
ERepository::begin_mirrors(const std::string & s) const
{
need_mirrors();
- return MirrorsIterator(_imp->mirrors.equal_range(s).first);
+ return MirrorsConstIterator(_imp->mirrors.equal_range(s).first);
}
-ERepository::MirrorsIterator
+ERepository::MirrorsConstIterator
ERepository::end_mirrors(const std::string & s) const
{
need_mirrors();
- return MirrorsIterator(_imp->mirrors.equal_range(s).second);
+ return MirrorsConstIterator(_imp->mirrors.equal_range(s).second);
}
tr1::shared_ptr<const ERepository::VirtualsSequence>
@@ -789,7 +789,7 @@ ERepository::virtual_packages() const
tr1::shared_ptr<VirtualsSequence> result(new VirtualsSequence);
- for (ERepositoryProfile::VirtualsIterator i(_imp->profile_ptr->begin_virtuals()),
+ for (ERepositoryProfile::VirtualsConstIterator i(_imp->profile_ptr->begin_virtuals()),
i_end(_imp->profile_ptr->end_virtuals()) ; i != i_end ; ++i)
result->push_back(RepositoryVirtualsEntry::create()
.provided_by_spec(i->second)
@@ -806,7 +806,7 @@ ERepository::do_use_expand_flags() const
std::string expand_sep(stringify(erepository::EAPIData::get_instance()->eapi_from_string(_imp->params.profile_eapi
)->supported->ebuild_options->use_expand_separator));
tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet);
- for (ERepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand()),
+ for (ERepositoryProfile::UseExpandConstIterator i(_imp->profile_ptr->begin_use_expand()),
i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i)
{
std::list<std::string> values;
@@ -830,7 +830,7 @@ ERepository::do_use_expand_prefixes() const
_imp->need_profiles();
tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet);
- for (ERepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand()),
+ for (ERepositoryProfile::UseExpandConstIterator i(_imp->profile_ptr->begin_use_expand()),
i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i)
{
std::string lower_i;
@@ -847,7 +847,7 @@ ERepository::do_use_expand_hidden_prefixes() const
_imp->need_profiles();
tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet);
- for (ERepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand_hidden()),
+ for (ERepositoryProfile::UseExpandConstIterator i(_imp->profile_ptr->begin_use_expand_hidden()),
i_end(_imp->profile_ptr->end_use_expand_hidden()) ; i != i_end ; ++i)
{
std::string lower_i;
@@ -876,33 +876,33 @@ ERepository::do_category_names_containing_package(const PackageNamePart & p) con
return result ? result : Repository::do_category_names_containing_package(p);
}
-ERepository::ProfilesIterator
+ERepository::ProfilesConstIterator
ERepository::begin_profiles() const
{
_imp->need_profiles_desc();
- return ProfilesIterator(_imp->profiles_desc.begin());
+ return ProfilesConstIterator(_imp->profiles_desc.begin());
}
-ERepository::ProfilesIterator
+ERepository::ProfilesConstIterator
ERepository::end_profiles() const
{
_imp->need_profiles_desc();
- return ProfilesIterator(_imp->profiles_desc.end());
+ return ProfilesConstIterator(_imp->profiles_desc.end());
}
-ERepository::ProfilesIterator
+ERepository::ProfilesConstIterator
ERepository::find_profile(const FSEntry & location) const
{
_imp->need_profiles_desc();
for (ProfilesDesc::const_iterator i(_imp->profiles_desc.begin()),
i_end(_imp->profiles_desc.end()) ; i != i_end ; ++i)
if (i->path == location)
- return ProfilesIterator(i);
- return ProfilesIterator(_imp->profiles_desc.end());
+ return ProfilesConstIterator(i);
+ return ProfilesConstIterator(_imp->profiles_desc.end());
}
void
-ERepository::set_profile(const ProfilesIterator & iter)
+ERepository::set_profile(const ProfilesConstIterator & iter)
{
Context context("When setting profile by iterator:");
@@ -921,14 +921,14 @@ ERepository::set_profile_by_arch(const UseFlagName & arch)
{
Context context("When setting profile by arch '" + stringify(arch) + "':");
- for (ProfilesIterator p(begin_profiles()), p_end(end_profiles()) ; p != p_end ; ++p)
+ for (ProfilesConstIterator p(begin_profiles()), p_end(end_profiles()) ; p != p_end ; ++p)
if (p->arch == stringify(arch) && p->status == "stable")
{
set_profile(p);
return;
}
- for (ProfilesIterator p(begin_profiles()), p_end(end_profiles()) ; p != p_end ; ++p)
+ for (ProfilesConstIterator p(begin_profiles()), p_end(end_profiles()) ; p != p_end ; ++p)
if (p->arch == stringify(arch))
{
set_profile(p);
@@ -949,7 +949,7 @@ ERepository::do_describe_use_flag(const UseFlagName & f,
std::string expand_sep(stringify(erepository::EAPIData::get_instance()->eapi_from_string(
_imp->params.profile_eapi)->supported->ebuild_options->use_expand_separator));
tr1::shared_ptr<const FSEntrySequence> use_desc_dirs(_imp->layout->use_desc_dirs());
- for (FSEntrySequence::Iterator p(use_desc_dirs->begin()), p_end(use_desc_dirs->end()) ;
+ for (FSEntrySequence::ConstIterator p(use_desc_dirs->begin()), p_end(use_desc_dirs->end()) ;
p != p_end ; ++p)
_imp->use_desc.push_back(tr1::shared_ptr<UseDesc>(new UseDesc(*p, expand_sep)));
}
@@ -1158,7 +1158,7 @@ ERepository::make_manifest(const QualifiedPackageName & qpn)
tr1::shared_ptr<Map<FSEntry, std::string> > files = _imp->layout->manifest_files(qpn);
- for (Map<FSEntry, std::string>::Iterator f(files->begin()) ;
+ for (Map<FSEntry, std::string>::ConstIterator f(files->begin()) ;
f != files->end() ; ++f)
{
FSEntry file(f->first);
@@ -1190,7 +1190,7 @@ ERepository::make_manifest(const QualifiedPackageName & qpn)
std::set<std::string> done_files;
- for (PackageIDSequence::Iterator v(versions->begin()),
+ for (PackageIDSequence::ConstIterator v(versions->begin()),
v_end(versions->end()) ;
v != v_end ; ++v)
{
@@ -1200,7 +1200,7 @@ ERepository::make_manifest(const QualifiedPackageName & qpn)
paludis::erepository::AAVisitor aa;
id->src_uri_key()->value()->accept(aa);
- for (paludis::erepository::AAVisitor::Iterator d(aa.begin()) ;
+ for (paludis::erepository::AAVisitor::ConstIterator d(aa.begin()) ;
d != aa.end() ; ++d)
{
if (done_files.count(*d))
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 6c5579f..4481b5b 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -162,10 +162,10 @@ namespace paludis
/* RepositoryMirrorsInterface */
- virtual MirrorsIterator begin_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator begin_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual MirrorsIterator end_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator end_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/* RepositoryVirtualsInterface */
@@ -213,11 +213,11 @@ namespace paludis
///\name Profile setting and querying functions
///\{
- ProfilesIterator begin_profiles() const;
- ProfilesIterator end_profiles() const;
+ ProfilesConstIterator begin_profiles() const;
+ ProfilesConstIterator end_profiles() const;
- ProfilesIterator find_profile(const FSEntry & location) const;
- void set_profile(const ProfilesIterator & iter);
+ ProfilesConstIterator find_profile(const FSEntry & location) const;
+ void set_profile(const ProfilesConstIterator & iter);
void set_profile_by_arch(const UseFlagName &);
///\}
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 886542d..eba55a9 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -782,7 +782,7 @@ namespace test_cases
int count(0);
tr1::shared_ptr<const RepositoryVirtualsInterface::VirtualsSequence> seq(repo->virtual_packages());
- for (RepositoryVirtualsInterface::VirtualsSequence::Iterator it(seq->begin()),
+ for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator it(seq->begin()),
it_end(seq->end()); it_end != it; ++it, ++count)
if ("virtual/one" == stringify(it->virtual_name))
{
@@ -806,7 +806,7 @@ namespace test_cases
count = 0;
seq = repo->virtual_packages();
- for (RepositoryVirtualsInterface::VirtualsSequence::Iterator it(seq->begin()),
+ for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator it(seq->begin()),
it_end(seq->end()); it_end != it; ++it, ++count)
if ("virtual/one" == stringify(it->virtual_name))
{
diff --git a/paludis/repositories/e/e_repository_mask_file.cc b/paludis/repositories/e/e_repository_mask_file.cc
index 1ecf793..a1b5ae6 100644
--- a/paludis/repositories/e/e_repository_mask_file.cc
+++ b/paludis/repositories/e/e_repository_mask_file.cc
@@ -52,7 +52,7 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) :
LineConfigFile file(f, myopts);
tr1::shared_ptr<Sequence<std::string> > comment(new Sequence<std::string>);
bool comment_used(false);
- for (LineConfigFile::Iterator it(file.begin()), it_end(file.end()); it_end != it; ++it)
+ for (LineConfigFile::ConstIterator it(file.begin()), it_end(file.end()); it_end != it; ++it)
{
if (it->empty())
{
@@ -79,16 +79,16 @@ MaskFile::MaskFile(const FSEntry & f, const LineConfigFileOptions & opts) :
}
}
-MaskFile::Iterator
+MaskFile::ConstIterator
MaskFile::begin() const
{
- return Iterator(_imp->lines.begin());
+ return ConstIterator(_imp->lines.begin());
}
-MaskFile::Iterator
+MaskFile::ConstIterator
MaskFile::end() const
{
- return Iterator(_imp->lines.end());
+ return ConstIterator(_imp->lines.end());
}
MaskFile::~MaskFile()
diff --git a/paludis/repositories/e/e_repository_mask_file.hh b/paludis/repositories/e/e_repository_mask_file.hh
index b6dff82..464fa95 100644
--- a/paludis/repositories/e/e_repository_mask_file.hh
+++ b/paludis/repositories/e/e_repository_mask_file.hh
@@ -54,9 +54,10 @@ namespace paludis
///\name Iterate over our mask lines.
///\{
- typedef libwrapiter::ForwardIterator<MaskFile, const std::pair<const std::string, tr1::shared_ptr<const RepositoryMaskInfo> > > Iterator;
- Iterator begin() const;
- Iterator end() const;
+ typedef libwrapiter::ForwardIterator<MaskFile,
+ const std::pair<const std::string, tr1::shared_ptr<const RepositoryMaskInfo> > > ConstIterator;
+ ConstIterator begin() const;
+ ConstIterator end() const;
///\}
};
diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc
index 205c691..1ed2768 100644
--- a/paludis/repositories/e/e_repository_news.cc
+++ b/paludis/repositories/e/e_repository_news.cc
@@ -127,7 +127,7 @@ ERepositoryNews::update_news() const
if (news.begin_display_if_installed() != news.end_display_if_installed())
{
bool local_show(false);
- for (NewsFile::DisplayIfInstalledIterator i(news.begin_display_if_installed()),
+ for (NewsFile::DisplayIfInstalledConstIterator i(news.begin_display_if_installed()),
i_end(news.end_display_if_installed()) ; i != i_end ; ++i)
if (! _imp->environment->package_database()->query(
query::Matches(PackageDepSpec(*i, pds_pm_permissive)) &
@@ -140,7 +140,7 @@ ERepositoryNews::update_news() const
if (news.begin_display_if_keyword() != news.end_display_if_keyword())
{
bool local_show(false);
- for (NewsFile::DisplayIfKeywordIterator i(news.begin_display_if_keyword()),
+ for (NewsFile::DisplayIfKeywordConstIterator i(news.begin_display_if_keyword()),
i_end(news.end_display_if_keyword()) ; i != i_end && ! local_show ; ++i)
if (*i == _imp->e_repository->profile_variable("ARCH"))
local_show = true;
@@ -151,14 +151,14 @@ ERepositoryNews::update_news() const
{
bool local_show(false);
tr1::shared_ptr<const FSEntrySequence> c(_imp->params.profiles);
- for (FSEntrySequence::Iterator p(c->begin()), p_end(c->end()) ; p != p_end ; ++p)
+ for (FSEntrySequence::ConstIterator p(c->begin()), p_end(c->end()) ; p != p_end ; ++p)
{
std::string profile(strip_leading_string(strip_trailing_string(
strip_leading_string(stringify(p->realpath()),
stringify(p->realpath())), "/"), "/"));
Log::get_instance()->message(ll_debug, lc_no_context,
"Profile path is '" + profile + "'");
- for (NewsFile::DisplayIfProfileIterator i(news.begin_display_if_profile()),
+ for (NewsFile::DisplayIfProfileConstIterator i(news.begin_display_if_profile()),
i_end(news.end_display_if_profile()) ; i != i_end ; ++i)
if (profile == *i)
local_show = true;
@@ -225,7 +225,7 @@ NewsFile::NewsFile(const FSEntry & our_filename) :
LineConfigFile line_file(our_filename, LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_no_skip_blank_lines
+ lcfo_disallow_comments);
- for (LineConfigFile::Iterator line(line_file.begin()), line_end(line_file.end()) ;
+ for (LineConfigFile::ConstIterator line(line_file.begin()), line_end(line_file.end()) ;
line != line_end ; ++line)
{
if (line->empty())
@@ -255,40 +255,40 @@ NewsFile::~NewsFile()
{
}
-NewsFile::DisplayIfInstalledIterator
+NewsFile::DisplayIfInstalledConstIterator
NewsFile::begin_display_if_installed() const
{
- return DisplayIfInstalledIterator(_imp->display_if_installed.begin());
+ return DisplayIfInstalledConstIterator(_imp->display_if_installed.begin());
}
-NewsFile::DisplayIfInstalledIterator
+NewsFile::DisplayIfInstalledConstIterator
NewsFile::end_display_if_installed() const
{
- return DisplayIfInstalledIterator(_imp->display_if_installed.end());
+ return DisplayIfInstalledConstIterator(_imp->display_if_installed.end());
}
-NewsFile::DisplayIfKeywordIterator
+NewsFile::DisplayIfKeywordConstIterator
NewsFile::begin_display_if_keyword() const
{
- return DisplayIfKeywordIterator(_imp->display_if_keyword.begin());
+ return DisplayIfKeywordConstIterator(_imp->display_if_keyword.begin());
}
-NewsFile::DisplayIfKeywordIterator
+NewsFile::DisplayIfKeywordConstIterator
NewsFile::end_display_if_keyword() const
{
- return DisplayIfKeywordIterator(_imp->display_if_keyword.end());
+ return DisplayIfKeywordConstIterator(_imp->display_if_keyword.end());
}
-NewsFile::DisplayIfProfileIterator
+NewsFile::DisplayIfProfileConstIterator
NewsFile::begin_display_if_profile() const
{
- return DisplayIfProfileIterator(_imp->display_if_profile.begin());
+ return DisplayIfProfileConstIterator(_imp->display_if_profile.begin());
}
-NewsFile::DisplayIfProfileIterator
+NewsFile::DisplayIfProfileConstIterator
NewsFile::end_display_if_profile() const
{
- return DisplayIfProfileIterator(_imp->display_if_profile.end());
+ return DisplayIfProfileConstIterator(_imp->display_if_profile.end());
}
diff --git a/paludis/repositories/e/e_repository_news.hh b/paludis/repositories/e/e_repository_news.hh
index 6abeb2e..32ed764 100644
--- a/paludis/repositories/e/e_repository_news.hh
+++ b/paludis/repositories/e/e_repository_news.hh
@@ -84,45 +84,45 @@ namespace paludis
///\name Iterate over our Display-If-Installed headers
///\{
- /// Tag for DisplayIfInstalledIterator.
- struct DisplayIfInstalledIteratorTag;
+ /// Tag for DisplayIfInstalledConstIterator.
+ struct DisplayIfInstalledConstIteratorTag;
- typedef libwrapiter::ForwardIterator<DisplayIfInstalledIteratorTag,
- const std::string> DisplayIfInstalledIterator;
+ typedef libwrapiter::ForwardIterator<DisplayIfInstalledConstIteratorTag,
+ const std::string> DisplayIfInstalledConstIterator;
- DisplayIfInstalledIterator begin_display_if_installed() const;
+ DisplayIfInstalledConstIterator begin_display_if_installed() const;
- DisplayIfInstalledIterator end_display_if_installed() const;
+ DisplayIfInstalledConstIterator end_display_if_installed() const;
///\}
///\name Iterate over our Display-If-Keyword headers
///\{
- /// Tag for DisplayIfKeywordIterator.
- struct DisplayIfKeywordIteratorTag;
+ /// Tag for DisplayIfKeywordConstIterator.
+ struct DisplayIfKeywordConstIteratorTag;
- typedef libwrapiter::ForwardIterator<DisplayIfKeywordIteratorTag,
- const std::string> DisplayIfKeywordIterator;
+ typedef libwrapiter::ForwardIterator<DisplayIfKeywordConstIteratorTag,
+ const std::string> DisplayIfKeywordConstIterator;
- DisplayIfKeywordIterator begin_display_if_keyword() const;
+ DisplayIfKeywordConstIterator begin_display_if_keyword() const;
- DisplayIfKeywordIterator end_display_if_keyword() const;
+ DisplayIfKeywordConstIterator end_display_if_keyword() const;
///\}
///\name Iterate over our Display-If-Profile headers
///\{
- /// Tag for DisplayIfProfileIterator.
- struct DisplayIfProfileIteratorTag;
+ /// Tag for DisplayIfProfileConstIterator.
+ struct DisplayIfProfileConstIteratorTag;
- typedef libwrapiter::ForwardIterator<DisplayIfProfileIteratorTag,
- const std::string> DisplayIfProfileIterator;
+ typedef libwrapiter::ForwardIterator<DisplayIfProfileConstIteratorTag,
+ const std::string> DisplayIfProfileConstIterator;
- DisplayIfProfileIterator begin_display_if_profile() const;
+ DisplayIfProfileConstIterator begin_display_if_profile() const;
- DisplayIfProfileIterator end_display_if_profile() const;
+ DisplayIfProfileConstIterator end_display_if_profile() const;
///\}
};
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index a643012..df45041 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -179,7 +179,7 @@ namespace paludis
Context context("When loading profiles for repository '" + stringify(name) + "':");
load_environment();
- for (FSEntrySequence::Iterator d(dirs.begin()), d_end(dirs.end()) ;
+ for (FSEntrySequence::ConstIterator d(dirs.begin()), d_end(dirs.end()) ;
d != d_end ; ++d)
{
Context subcontext("When using directory '" + stringify(*d) + "':");
@@ -252,7 +252,7 @@ Implementation<ERepositoryProfile>::load_profile_parent(const FSEntry & dir)
LineConfigFile file(dir / "parent", LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_disallow_comments);
- LineConfigFile::Iterator i(file.begin()), i_end(file.end());
+ LineConfigFile::ConstIterator i(file.begin()), i_end(file.end());
bool once(false);
if (i == i_end)
Log::get_instance()->message(ll_warning, lc_context, "parent file is empty");
@@ -298,7 +298,7 @@ Implementation<ERepositoryProfile>::load_profile_make_defaults(const FSEntry & d
KeyValueConfigFile file(dir / "make.defaults", KeyValueConfigFileOptions() +
kvcfo_disallow_space_around_equals + kvcfo_disallow_space_inside_unquoted_values);
- for (KeyValueConfigFile::Iterator k(file.begin()), k_end(file.end()) ;
+ for (KeyValueConfigFile::ConstIterator k(file.begin()), k_end(file.end()) ;
k != k_end ; ++k)
{
if (is_incremental(k->first))
@@ -427,7 +427,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
{
try
{
- for (erepository::ProfileFile<LineConfigFile>::Iterator i(packages_file.begin()), i_end(packages_file.end()) ; i != i_end ; ++i)
+ for (erepository::ProfileFile<LineConfigFile>::ConstIterator i(packages_file.begin()), i_end(packages_file.end()) ; i != i_end ; ++i)
{
if (0 != i->compare(0, 1, "*", 0, 1))
continue;
@@ -448,7 +448,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
env->default_distribution())->support_old_style_virtuals)
try
{
- for (erepository::ProfileFile<LineConfigFile>::Iterator line(virtuals_file.begin()), line_end(virtuals_file.end()) ;
+ for (erepository::ProfileFile<LineConfigFile>::ConstIterator line(virtuals_file.begin()), line_end(virtuals_file.end()) ;
line != line_end ; ++line)
{
std::vector<std::string> tokens;
@@ -468,7 +468,7 @@ Implementation<ERepositoryProfile>::make_vars_from_file_vars()
" failed due to exception: " + e.message() + " (" + e.what() + ")");
}
- for (erepository::ProfileFile<erepository::MaskFile>::Iterator line(package_mask_file.begin()), line_end(package_mask_file.end()) ;
+ for (erepository::ProfileFile<erepository::MaskFile>::ConstIterator line(package_mask_file.begin()), line_end(package_mask_file.end()) ;
line != line_end ; ++line)
{
if (line->first.empty())
@@ -501,7 +501,7 @@ Implementation<ERepositoryProfile>::load_basic_use_file(const FSEntry & file, Fl
Context context("When loading basic use file '" + stringify(file) + ":");
LineConfigFile f(file, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(f.begin()), line_end(f.end()) ;
+ for (LineConfigFile::ConstIterator line(f.begin()), line_end(f.end()) ;
line != line_end ; ++line)
{
std::list<std::string> tokens;
@@ -536,7 +536,7 @@ Implementation<ERepositoryProfile>::load_spec_use_file(const FSEntry & file, Pac
Context context("When loading specised use file '" + stringify(file) + ":");
LineConfigFile f(file, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(f.begin()), line_end(f.end()) ;
+ for (LineConfigFile::ConstIterator line(f.begin()), line_end(f.end()) ;
line != line_end ; ++line)
{
std::list<std::string> tokens;
@@ -719,7 +719,7 @@ ERepositoryProfile::use_state_ignoring_masks(const UseFlagName & u,
{
if (e.iuse_key())
{
- IUseFlagSet::Iterator i(e.iuse_key()->value()->find(IUseFlag(u, use_unspecified, std::string::npos)));
+ IUseFlagSet::ConstIterator i(e.iuse_key()->value()->find(IUseFlag(u, use_unspecified, std::string::npos)));
if (i != e.iuse_key()->value()->end())
result = i->state;
}
@@ -744,46 +744,46 @@ ERepositoryProfile::system_packages() const
return _imp->system_packages;
}
-ERepositoryProfile::UseExpandIterator
+ERepositoryProfile::UseExpandConstIterator
ERepositoryProfile::begin_use_expand() const
{
- return UseExpandIterator(_imp->use_expand.begin());
+ return UseExpandConstIterator(_imp->use_expand.begin());
}
-ERepositoryProfile::UseExpandIterator
+ERepositoryProfile::UseExpandConstIterator
ERepositoryProfile::end_use_expand() const
{
- return UseExpandIterator(_imp->use_expand.end());
+ return UseExpandConstIterator(_imp->use_expand.end());
}
-ERepositoryProfile::UseExpandIterator
+ERepositoryProfile::UseExpandConstIterator
ERepositoryProfile::begin_use_expand_hidden() const
{
- return UseExpandIterator(_imp->use_expand_hidden.begin());
+ return UseExpandConstIterator(_imp->use_expand_hidden.begin());
}
-ERepositoryProfile::UseExpandIterator
+ERepositoryProfile::UseExpandConstIterator
ERepositoryProfile::end_use_expand_hidden() const
{
- return UseExpandIterator(_imp->use_expand_hidden.end());
+ return UseExpandConstIterator(_imp->use_expand_hidden.end());
}
-ERepositoryProfile::VirtualsIterator
+ERepositoryProfile::VirtualsConstIterator
ERepositoryProfile::begin_virtuals() const
{
- return VirtualsIterator(_imp->virtuals.begin());
+ return VirtualsConstIterator(_imp->virtuals.begin());
}
-ERepositoryProfile::VirtualsIterator
+ERepositoryProfile::VirtualsConstIterator
ERepositoryProfile::find_virtual(const QualifiedPackageName & n) const
{
- return VirtualsIterator(_imp->virtuals.find(n));
+ return VirtualsConstIterator(_imp->virtuals.find(n));
}
-ERepositoryProfile::VirtualsIterator
+ERepositoryProfile::VirtualsConstIterator
ERepositoryProfile::end_virtuals() const
{
- return VirtualsIterator(_imp->virtuals.end());
+ return VirtualsConstIterator(_imp->virtuals.end());
}
tr1::shared_ptr<const RepositoryMaskInfo>
diff --git a/paludis/repositories/e/e_repository_profile.hh b/paludis/repositories/e/e_repository_profile.hh
index 64d8c84..12aa340 100644
--- a/paludis/repositories/e/e_repository_profile.hh
+++ b/paludis/repositories/e/e_repository_profile.hh
@@ -84,12 +84,12 @@ namespace paludis
///\name Iterate over USE_EXPAND, USE_EXPAND_HIDDEN
///\{
- typedef libwrapiter::ForwardIterator<ERepositoryProfile, const UseFlagName> UseExpandIterator;
+ typedef libwrapiter::ForwardIterator<ERepositoryProfile, const UseFlagName> UseExpandConstIterator;
- UseExpandIterator begin_use_expand() const;
- UseExpandIterator end_use_expand() const;
- UseExpandIterator begin_use_expand_hidden() const;
- UseExpandIterator end_use_expand_hidden() const;
+ UseExpandConstIterator begin_use_expand() const;
+ UseExpandConstIterator end_use_expand() const;
+ UseExpandConstIterator begin_use_expand_hidden() const;
+ UseExpandConstIterator end_use_expand_hidden() const;
///\}
@@ -119,11 +119,11 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<ERepositoryProfile,
- const std::pair<const QualifiedPackageName, tr1::shared_ptr<const PackageDepSpec> > > VirtualsIterator;
+ const std::pair<const QualifiedPackageName, tr1::shared_ptr<const PackageDepSpec> > > VirtualsConstIterator;
- VirtualsIterator begin_virtuals() const;
- VirtualsIterator end_virtuals() const;
- VirtualsIterator find_virtual(const QualifiedPackageName &) const;
+ VirtualsConstIterator begin_virtuals() const;
+ VirtualsConstIterator end_virtuals() const;
+ VirtualsConstIterator find_virtual(const QualifiedPackageName &) const;
///\}
};
diff --git a/paludis/repositories/e/e_repository_profile_file.cc b/paludis/repositories/e/e_repository_profile_file.cc
index 4c11f29..414da40 100644
--- a/paludis/repositories/e/e_repository_profile_file.cc
+++ b/paludis/repositories/e/e_repository_profile_file.cc
@@ -77,7 +77,7 @@ namespace paludis
template <typename F_>
struct Implementation<ProfileFile<F_> >
{
- typedef std::list<typename tr1::remove_const<typename F_::Iterator::value_type>::type> Lines;
+ typedef std::list<typename tr1::remove_const<typename F_::ConstIterator::value_type>::type> Lines;
Lines lines;
};
}
@@ -92,9 +92,9 @@ ProfileFile<F_>::add_file(const FSEntry & f)
return;
F_ file(f, LineConfigFileOptions());
- for (typename F_::Iterator line(file.begin()), line_end(file.end()) ; line != line_end ; ++line)
+ for (typename F_::ConstIterator line(file.begin()), line_end(file.end()) ; line != line_end ; ++line)
{
- const std::string & key(FileEntryTraits<typename F_::Iterator::value_type>::extract_key(*line));
+ const std::string & key(FileEntryTraits<typename F_::ConstIterator::value_type>::extract_key(*line));
if (0 == key.compare(0, 1, "-", 0, 1))
{
typename Implementation<ProfileFile>::Lines::iterator i(
@@ -127,17 +127,17 @@ ProfileFile<F_>::~ProfileFile()
}
template <typename F_>
-typename ProfileFile<F_>::Iterator
+typename ProfileFile<F_>::ConstIterator
ProfileFile<F_>::begin() const
{
- return Iterator(this->_imp->lines.begin());
+ return ConstIterator(this->_imp->lines.begin());
}
template <typename F_>
-typename ProfileFile<F_>::Iterator
+typename ProfileFile<F_>::ConstIterator
ProfileFile<F_>::end() const
{
- return Iterator(this->_imp->lines.end());
+ return ConstIterator(this->_imp->lines.end());
}
template class ProfileFile<LineConfigFile>;
diff --git a/paludis/repositories/e/e_repository_profile_file.hh b/paludis/repositories/e/e_repository_profile_file.hh
index 64a3e10..59165ec 100644
--- a/paludis/repositories/e/e_repository_profile_file.hh
+++ b/paludis/repositories/e/e_repository_profile_file.hh
@@ -58,9 +58,9 @@ namespace paludis
///\name Iterate over our profile lines.
///\{
- typedef libwrapiter::ForwardIterator<ProfileFile, typename F_::Iterator::value_type> Iterator;
- Iterator begin() const;
- Iterator end() const;
+ typedef libwrapiter::ForwardIterator<ProfileFile, typename F_::ConstIterator::value_type> ConstIterator;
+ ConstIterator begin() const;
+ ConstIterator end() const;
///\}
};
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index f256bdb..a5e5525 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -202,7 +202,7 @@ namespace
/* a package is affected if it matches any vulnerable line, except if it matches
* any unaffected line. */
bool vulnerable(false);
- for (GLSAPackage::RangesIterator r(glsa_pkg.begin_vulnerable()), r_end(glsa_pkg.end_vulnerable()) ;
+ for (GLSAPackage::RangesConstIterator r(glsa_pkg.begin_vulnerable()), r_end(glsa_pkg.end_vulnerable()) ;
r != r_end && ! vulnerable ; ++r)
if (match_range(c, *r))
vulnerable = true;
@@ -210,7 +210,7 @@ namespace
if (! vulnerable)
return false;
- for (GLSAPackage::RangesIterator r(glsa_pkg.begin_unaffected()), r_end(glsa_pkg.end_unaffected()) ;
+ for (GLSAPackage::RangesConstIterator r(glsa_pkg.begin_unaffected()), r_end(glsa_pkg.end_unaffected()) ;
r != r_end && vulnerable ; ++r)
if (match_range(c, *r))
vulnerable = false;
@@ -244,7 +244,7 @@ ERepositorySets::security_set(bool insecurity) const
Context local_local_context("When handling GLSA '" + glsa->id() + "' from '" +
stringify(*f) + "':");
- for (GLSA::PackagesIterator glsa_pkg(glsa->begin_packages()),
+ for (GLSA::PackagesConstIterator glsa_pkg(glsa->begin_packages()),
glsa_pkg_end(glsa->end_packages()) ; glsa_pkg != glsa_pkg_end ; ++glsa_pkg)
{
tr1::shared_ptr<const PackageIDSequence> candidates;
@@ -256,7 +256,7 @@ ERepositorySets::security_set(bool insecurity) const
query::SupportsAction<InstalledAction>(),
qo_order_by_version);
- for (PackageIDSequence::Iterator c(candidates->begin()), c_end(candidates->end()) ;
+ for (PackageIDSequence::ConstIterator c(candidates->begin()), c_end(candidates->end()) ;
c != c_end ; ++c)
{
if (! is_vulnerable(*glsa_pkg, **c))
@@ -303,7 +303,7 @@ ERepositorySets::security_set(bool insecurity) const
query::NotMasked(),
qo_order_by_version));
- for (PackageIDSequence::ReverseIterator r(available->rbegin()), r_end(available->rend()) ; r != r_end ; ++r)
+ for (PackageIDSequence::ReverseConstIterator r(available->rbegin()), r_end(available->rend()) ; r != r_end ; ++r)
{
if (is_vulnerable(*glsa_pkg, **r))
{
diff --git a/paludis/repositories/e/eapi_phase.cc b/paludis/repositories/e/eapi_phase.cc
index ab299ae..7d365bf 100644
--- a/paludis/repositories/e/eapi_phase.cc
+++ b/paludis/repositories/e/eapi_phase.cc
@@ -74,16 +74,16 @@ EAPIPhase::option(const std::string & s) const
return _imp->options.count(s);
}
-EAPIPhase::Iterator
+EAPIPhase::ConstIterator
EAPIPhase::begin_commands() const
{
- return Iterator(_imp->commands.begin());
+ return ConstIterator(_imp->commands.begin());
}
-EAPIPhase::Iterator
+EAPIPhase::ConstIterator
EAPIPhase::end_commands() const
{
- return Iterator(_imp->commands.end());
+ return ConstIterator(_imp->commands.end());
}
EAPIPhases::EAPIPhases(const std::string & s) :
@@ -103,15 +103,15 @@ EAPIPhases::~EAPIPhases()
{
}
-EAPIPhases::Iterator
+EAPIPhases::ConstIterator
EAPIPhases::begin_phases() const
{
- return Iterator(indirect_iterator(_imp->phases.begin()));
+ return ConstIterator(indirect_iterator(_imp->phases.begin()));
}
-EAPIPhases::Iterator
+EAPIPhases::ConstIterator
EAPIPhases::end_phases() const
{
- return Iterator(indirect_iterator(_imp->phases.end()));
+ return ConstIterator(indirect_iterator(_imp->phases.end()));
}
diff --git a/paludis/repositories/e/eapi_phase.hh b/paludis/repositories/e/eapi_phase.hh
index d850b35..212a5fd 100644
--- a/paludis/repositories/e/eapi_phase.hh
+++ b/paludis/repositories/e/eapi_phase.hh
@@ -53,9 +53,9 @@ namespace paludis
bool option(const std::string &) const;
bool option_contains(const std::string &, const std::string &) const;
- typedef libwrapiter::ForwardIterator<EAPIPhase, const std::string> Iterator;
- Iterator begin_commands() const;
- Iterator end_commands() const;
+ typedef libwrapiter::ForwardIterator<EAPIPhase, const std::string> ConstIterator;
+ ConstIterator begin_commands() const;
+ ConstIterator end_commands() const;
///\}
};
@@ -82,9 +82,9 @@ namespace paludis
///\name Information about the phases
///\{
- typedef libwrapiter::ForwardIterator<EAPIPhases, const EAPIPhase> Iterator;
- Iterator begin_phases() const;
- Iterator end_phases() const;
+ typedef libwrapiter::ForwardIterator<EAPIPhases, const EAPIPhase> ConstIterator;
+ ConstIterator begin_phases() const;
+ ConstIterator end_phases() const;
///\}
};
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 85cb638..abee083 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -305,7 +305,7 @@ namespace
{
std::string get(const tr1::shared_ptr<const Map<std::string, std::string> > & k, const std::string & s)
{
- Map<std::string, std::string>::Iterator i(k->find(s));
+ Map<std::string, std::string>::ConstIterator i(k->find(s));
if (k->end() == i)
return "";
return i->second;
@@ -471,7 +471,7 @@ EbuildNoFetchCommand::extend_command(const Command & cmd)
if (! params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand.empty())
result.with_setenv(params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand, fetch_params.use_expand);
- for (Map<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::ConstIterator
i(fetch_params.expand_vars->begin()),
j(fetch_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
@@ -547,7 +547,7 @@ EbuildInstallCommand::extend_command(const Command & cmd)
if (! params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand.empty())
result.with_setenv(params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand, install_params.use_expand);
- for (Map<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::ConstIterator
i(install_params.expand_vars->begin()),
j(install_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
@@ -733,7 +733,7 @@ EbuildPretendCommand::extend_command(const Command & cmd)
if (! params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand.empty())
result.with_setenv(params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand, pretend_params.use_expand);
- for (Map<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::ConstIterator
i(pretend_params.expand_vars->begin()),
j(pretend_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
@@ -789,7 +789,7 @@ EbuildInfoCommand::extend_command(const Command & cmd)
if (! params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand.empty())
result.with_setenv(params.package_id->eapi()->supported->ebuild_environment_variables->env_use_expand, info_params.use_expand);
- for (Map<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::ConstIterator
i(info_params.expand_vars->begin()),
j(info_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index f690b7a..2ca8a60 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -134,14 +134,14 @@ namespace
{
}
- typedef std::list<const URIDepSpec *>::const_iterator Iterator;
+ typedef std::list<const URIDepSpec *>::const_iterator ConstIterator;
- Iterator begin()
+ ConstIterator begin()
{
return _specs.begin();
}
- Iterator end() const
+ ConstIterator end() const
{
return _specs.end();
}
@@ -197,14 +197,14 @@ namespace
}
}
- typedef std::list<std::pair<const URIDepSpec *, const LabelsDepSpec<URILabelVisitorTypes> *> >::const_iterator Iterator;
+ typedef std::list<std::pair<const URIDepSpec *, const LabelsDepSpec<URILabelVisitorTypes> *> >::const_iterator ConstIterator;
- Iterator begin()
+ ConstIterator begin()
{
return _specs.begin();
}
- Iterator end() const
+ ConstIterator end() const
{
return _specs.end();
}
@@ -217,7 +217,7 @@ namespace
get_root(tr1::shared_ptr<const DestinationsSet> destinations)
{
if (destinations)
- for (DestinationsSet::Iterator d(destinations->begin()), d_end(destinations->end()) ;
+ for (DestinationsSet::ConstIterator d(destinations->begin()), d_end(destinations->end()) ;
d != d_end ; ++d)
if ((*d)->installed_interface)
return (*d)->installed_interface->root();
@@ -232,7 +232,7 @@ namespace
std::string use;
if (id.iuse_key())
- for (IUseFlagSet::Iterator i(id.iuse_key()->value()->begin()),
+ for (IUseFlagSet::ConstIterator i(id.iuse_key()->value()->begin()),
i_end(id.iuse_key()->value()->end()) ; i != i_end ; ++i)
if (env->query_use(i->flag, id))
use += stringify(i->flag) + " ";
@@ -254,7 +254,7 @@ namespace
tr1::shared_ptr<Map<std::string, std::string> > expand_vars(
new Map<std::string, std::string>);
- for (ERepositoryProfile::UseExpandIterator x(profile->begin_use_expand()),
+ for (ERepositoryProfile::UseExpandConstIterator x(profile->begin_use_expand()),
x_end(profile->end_use_expand()) ; x != x_end ; ++x)
{
std::string lower_x;
@@ -270,7 +270,7 @@ namespace
/* possible values from environment */
tr1::shared_ptr<const UseFlagNameSet> possible_values_from_env(
env->known_use_expand_names(*x, e));
- for (UseFlagNameSet::Iterator i(possible_values_from_env->begin()),
+ for (UseFlagNameSet::ConstIterator i(possible_values_from_env->begin()),
i_end(possible_values_from_env->end()) ; i != i_end ; ++i)
possible_values.insert(UseFlagName(stringify(*i).substr(lower_x.length() + 1)));
@@ -284,7 +284,7 @@ namespace
use.append(lower_x + expand_sep + stringify(*u) + " ");
std::string value;
- Map<std::string, std::string>::Iterator i(expand_vars->find(stringify(*x)));
+ Map<std::string, std::string>::ConstIterator i(expand_vars->find(stringify(*x)));
if (expand_vars->end() != i)
{
value = i->second;
@@ -364,7 +364,7 @@ EbuildEntries::fetch(const tr1::shared_ptr<const ERepositoryID> & id,
if (id->src_uri_key())
id->src_uri_key()->value()->accept(f);
- for (AFinder::Iterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
+ for (AFinder::ConstIterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
{
const URIDepSpec * const spec(static_cast<const URIDepSpec *>(i->first));
@@ -384,7 +384,7 @@ EbuildEntries::fetch(const tr1::shared_ptr<const ERepositoryID> & id,
id->src_uri_key()->value()->accept(g);
std::set<std::string> already_in_all_archives;
- for (AAFinder::Iterator gg(g.begin()), gg_end(g.end()) ; gg != gg_end ; ++gg)
+ for (AAFinder::ConstIterator gg(g.begin()), gg_end(g.end()) ; gg != gg_end ; ++gg)
{
if (already_in_all_archives.end() == already_in_all_archives.find((*gg)->filename()))
{
@@ -429,7 +429,7 @@ EbuildEntries::fetch(const tr1::shared_ptr<const ERepositoryID> & id,
tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_nofetch);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
EbuildCommandParams command_params(EbuildCommandParams::create()
@@ -498,7 +498,7 @@ EbuildEntries::install(const tr1::shared_ptr<const ERepositoryID> & id,
if (id->src_uri_key())
id->src_uri_key()->value()->accept(f);
- for (AFinder::Iterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
+ for (AFinder::ConstIterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
{
const URIDepSpec * const spec(static_cast<const URIDepSpec *>(i->first));
@@ -518,7 +518,7 @@ EbuildEntries::install(const tr1::shared_ptr<const ERepositoryID> & id,
id->src_uri_key()->value()->accept(g);
std::set<std::string> already_in_all_archives;
- for (AAFinder::Iterator gg(g.begin()), gg_end(g.end()) ; gg != gg_end ; ++gg)
+ for (AAFinder::ConstIterator gg(g.begin()), gg_end(g.end()) ; gg != gg_end ; ++gg)
{
if (already_in_all_archives.end() == already_in_all_archives.find((*gg)->filename()))
{
@@ -577,7 +577,7 @@ EbuildEntries::install(const tr1::shared_ptr<const ERepositoryID> & id,
}
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_install);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
if (phase->option("merge"))
@@ -695,7 +695,7 @@ EbuildEntries::info(const tr1::shared_ptr<const ERepositoryID> & id,
tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_info);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
if (phase->option("installed=true"))
@@ -836,7 +836,7 @@ EbuildEntries::pretend(const tr1::shared_ptr<const ERepositoryID> & id,
tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_pretend);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
EbuildCommandParams command_params(EbuildCommandParams::create()
diff --git a/paludis/repositories/e/eclass_mtimes.cc b/paludis/repositories/e/eclass_mtimes.cc
index a7d3dbc..f469882 100644
--- a/paludis/repositories/e/eclass_mtimes.cc
+++ b/paludis/repositories/e/eclass_mtimes.cc
@@ -63,7 +63,7 @@ EclassMtimes::mtime(const std::string & e) const
return i->second;
time_t r(0);
- for (FSEntrySequence::Iterator d(_imp->eclass_dirs->begin()),
+ for (FSEntrySequence::ConstIterator d(_imp->eclass_dirs->begin()),
d_end(_imp->eclass_dirs->end()) ; d != d_end ; ++d)
{
FSEntry f(*d / (e + ".eclass"));
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 7235818..7bfbfc9 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -146,7 +146,7 @@ ExheresLayout::need_category_names() const
LineConfigFile cats(*i, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(cats.begin()), line_end(cats.end()) ;
+ for (LineConfigFile::ConstIterator line(cats.begin()), line_end(cats.end()) ;
line != line_end ; ++line)
{
try
@@ -526,7 +526,7 @@ ExheresLayout::invalidate_masks()
Lock l(_imp->big_nasty_mutex);
for (IDMap::iterator it(_imp->ids.begin()), it_end(_imp->ids.end()); it_end != it; ++it)
- for (PackageIDSequence::Iterator it2(it->second->begin()), it2_end(it->second->end());
+ for (PackageIDSequence::ConstIterator it2(it->second->begin()), it2_end(it->second->end());
it2_end != it2; ++it2)
(*it2)->invalidate_masks();
}
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index 332cd67..95ec239 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -168,7 +168,7 @@ FetchVisitor::visit_leaf(const URIDepSpec & u)
SourceURIFinder source_uri_finder(_imp->env, _imp->id->repository().get(),
u.original_url(), u.filename(), _imp->mirrors_name);
(*_imp->labels.begin())->begin()->accept(source_uri_finder);
- for (SourceURIFinder::Iterator i(source_uri_finder.begin()), i_end(source_uri_finder.end()) ;
+ for (SourceURIFinder::ConstIterator i(source_uri_finder.begin()), i_end(source_uri_finder.end()) ;
i != i_end ; ++i)
{
Context local_context("When fetching URI '" + stringify(i->first) + "' to '" + stringify(i->second) + ":");
@@ -196,7 +196,7 @@ FetchVisitor::visit_leaf(const URIDepSpec & u)
const tr1::shared_ptr<const FSEntrySequence> fetch_dirs(_imp->env->fetchers_dirs());
bool found(false);
- for (FSEntrySequence::Iterator d(fetch_dirs->begin()), d_end(fetch_dirs->end()) ;
+ for (FSEntrySequence::ConstIterator d(fetch_dirs->begin()), d_end(fetch_dirs->end()) ;
d != d_end ; ++d)
if (make_fetcher(*d, protocol).exists())
{
diff --git a/paludis/repositories/e/glsa.cc b/paludis/repositories/e/glsa.cc
index 779eb46..58f9527 100644
--- a/paludis/repositories/e/glsa.cc
+++ b/paludis/repositories/e/glsa.cc
@@ -73,16 +73,16 @@ GLSAPackage::~GLSAPackage()
{
}
-GLSAPackage::ArchsIterator
+GLSAPackage::ArchsConstIterator
GLSAPackage::begin_archs() const
{
- return ArchsIterator(_imp->archs.begin());
+ return ArchsConstIterator(_imp->archs.begin());
}
-GLSAPackage::ArchsIterator
+GLSAPackage::ArchsConstIterator
GLSAPackage::end_archs() const
{
- return ArchsIterator(_imp->archs.end());
+ return ArchsConstIterator(_imp->archs.end());
}
void
@@ -91,28 +91,28 @@ GLSAPackage::add_arch(const UseFlagName & n)
_imp->archs.push_back(n);
}
-GLSAPackage::RangesIterator
+GLSAPackage::RangesConstIterator
GLSAPackage::begin_unaffected() const
{
- return RangesIterator(_imp->unaffected.begin());
+ return RangesConstIterator(_imp->unaffected.begin());
}
-GLSAPackage::RangesIterator
+GLSAPackage::RangesConstIterator
GLSAPackage::end_unaffected() const
{
- return RangesIterator(_imp->unaffected.end());
+ return RangesConstIterator(_imp->unaffected.end());
}
-GLSAPackage::RangesIterator
+GLSAPackage::RangesConstIterator
GLSAPackage::begin_vulnerable() const
{
- return RangesIterator(_imp->vulnerable.begin());
+ return RangesConstIterator(_imp->vulnerable.begin());
}
-GLSAPackage::RangesIterator
+GLSAPackage::RangesConstIterator
GLSAPackage::end_vulnerable() const
{
- return RangesIterator(_imp->vulnerable.end());
+ return RangesConstIterator(_imp->vulnerable.end());
}
void
@@ -142,16 +142,16 @@ GLSA::~GLSA()
{
}
-GLSA::PackagesIterator
+GLSA::PackagesConstIterator
GLSA::begin_packages() const
{
- return PackagesIterator(indirect_iterator(_imp->packages.begin()));
+ return PackagesConstIterator(indirect_iterator(_imp->packages.begin()));
}
-GLSA::PackagesIterator
+GLSA::PackagesConstIterator
GLSA::end_packages() const
{
- return PackagesIterator(indirect_iterator(_imp->packages.end()));
+ return PackagesConstIterator(indirect_iterator(_imp->packages.end()));
}
void
diff --git a/paludis/repositories/e/glsa.hh b/paludis/repositories/e/glsa.hh
index 7fa03f8..e412917 100644
--- a/paludis/repositories/e/glsa.hh
+++ b/paludis/repositories/e/glsa.hh
@@ -75,9 +75,9 @@ namespace paludis
///\name Iterate over our archs.
///\{
- typedef libwrapiter::ForwardIterator<GLSAPackage, const UseFlagName> ArchsIterator;
- ArchsIterator begin_archs() const;
- ArchsIterator end_archs() const;
+ typedef libwrapiter::ForwardIterator<GLSAPackage, const UseFlagName> ArchsConstIterator;
+ ArchsConstIterator begin_archs() const;
+ ArchsConstIterator end_archs() const;
///\}
@@ -89,11 +89,11 @@ namespace paludis
///\name Iterate over our ranges.
///\{
- typedef libwrapiter::ForwardIterator<GLSAPackage, const GLSARange> RangesIterator;
- RangesIterator begin_unaffected() const;
- RangesIterator end_unaffected() const;
- RangesIterator begin_vulnerable() const;
- RangesIterator end_vulnerable() const;
+ typedef libwrapiter::ForwardIterator<GLSAPackage, const GLSARange> RangesConstIterator;
+ RangesConstIterator begin_unaffected() const;
+ RangesConstIterator end_unaffected() const;
+ RangesConstIterator begin_vulnerable() const;
+ RangesConstIterator end_vulnerable() const;
///\}
@@ -139,9 +139,9 @@ namespace paludis
///\name Iterate over our packages.
///\{
- typedef libwrapiter::ForwardIterator<GLSA, const GLSAPackage> PackagesIterator;
- PackagesIterator begin_packages() const;
- PackagesIterator end_packages() const;
+ typedef libwrapiter::ForwardIterator<GLSA, const GLSAPackage> PackagesConstIterator;
+ PackagesConstIterator begin_packages() const;
+ PackagesConstIterator end_packages() const;
///\}
diff --git a/paludis/repositories/e/manifest2_reader.cc b/paludis/repositories/e/manifest2_reader.cc
index 7dc1d52..7d81e16 100644
--- a/paludis/repositories/e/manifest2_reader.cc
+++ b/paludis/repositories/e/manifest2_reader.cc
@@ -71,7 +71,7 @@ Manifest2Reader::Manifest2Reader(const FSEntry & f) :
LineConfigFile lines(_imp->manifest, LineConfigFileOptions());
- for (LineConfigFile::Iterator l(lines.begin()), l_end(lines.end()) ;
+ for (LineConfigFile::ConstIterator l(lines.begin()), l_end(lines.end()) ;
l != l_end ; ++l)
{
std::list<std::string> tokens;
@@ -125,7 +125,7 @@ Manifest2Reader::Manifest2Reader(const FSEntry & f) :
Log::get_instance()->message(ll_debug, lc_no_context)
<< "Skipping unknown checksum type " << checksum_type;
}
-
+
_imp->entries.push_back(Manifest2Entry::create()
.type(type)
.size(size)
@@ -142,14 +142,14 @@ Manifest2Reader::~Manifest2Reader()
{
}
-Manifest2Reader::Iterator
+Manifest2Reader::ConstIterator
Manifest2Reader::begin() const
{
- return Iterator(_imp->entries.begin());
+ return ConstIterator(_imp->entries.begin());
}
-Manifest2Reader::Iterator
+Manifest2Reader::ConstIterator
Manifest2Reader::end() const
{
- return Iterator(_imp->entries.end());
+ return ConstIterator(_imp->entries.end());
}
diff --git a/paludis/repositories/e/manifest2_reader.hh b/paludis/repositories/e/manifest2_reader.hh
index 978ba83..7cd1940 100644
--- a/paludis/repositories/e/manifest2_reader.hh
+++ b/paludis/repositories/e/manifest2_reader.hh
@@ -54,7 +54,7 @@ namespace paludis
};
/**
- * Gives an Iterator of Manifest2Entrys from a given Manifest 2 style
+ * Gives an ConstIterator of Manifest2Entrys from a given Manifest 2 style
* file.
*
* \ingroup grpmanifest2reader
@@ -69,12 +69,12 @@ namespace paludis
~Manifest2Reader();
///}
-
+
/// \name Iterator functions
-
- typedef libwrapiter::ForwardIterator<Manifest2Reader, const Manifest2Entry> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ typedef libwrapiter::ForwardIterator<Manifest2Reader, const Manifest2Entry> ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///}
};
diff --git a/paludis/repositories/e/qa/qa_checks_group.cc b/paludis/repositories/e/qa/qa_checks_group.cc
index d2f8111..262b5ad 100644
--- a/paludis/repositories/e/qa/qa_checks_group.cc
+++ b/paludis/repositories/e/qa/qa_checks_group.cc
@@ -59,19 +59,19 @@ QAChecksGroup<T_>::~QAChecksGroup()
template <typename T_>
-typename QAChecksGroup<T_>::Iterator
+typename QAChecksGroup<T_>::ConstIterator
QAChecksGroup<T_>::begin() const
{
need_ordering();
- return Iterator(_imp->ordered->begin());
+ return ConstIterator(_imp->ordered->begin());
}
template <typename T_>
-typename QAChecksGroup<T_>::Iterator
+typename QAChecksGroup<T_>::ConstIterator
QAChecksGroup<T_>::end() const
{
need_ordering();
- return Iterator(_imp->ordered->end());
+ return ConstIterator(_imp->ordered->end());
}
template <typename T_>
diff --git a/paludis/repositories/e/qa/qa_checks_group.hh b/paludis/repositories/e/qa/qa_checks_group.hh
index 607719b..30379e6 100644
--- a/paludis/repositories/e/qa/qa_checks_group.hh
+++ b/paludis/repositories/e/qa/qa_checks_group.hh
@@ -43,9 +43,9 @@ namespace paludis
QAChecksGroup();
~QAChecksGroup();
- typedef libwrapiter::ForwardIterator<QAChecksGroup<T_>, T_> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<QAChecksGroup<T_>, T_> ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
void add_check(const std::string &, const T_ &);
void add_prerequirement(const std::string &, const std::string &);
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index 0cc0e8e..dccf9c7 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -53,7 +53,7 @@ namespace
const tr1::shared_ptr<const PackageID> & id;
const tr1::shared_ptr<const ERepository> repo;
const std::set<KeywordName> & accepted_keywords;
- const ERepository::ProfilesIterator profile;
+ const ERepository::ProfilesConstIterator profile;
const std::string name;
const bool unstable;
const tr1::shared_ptr<const MetadataKey> & key;
@@ -68,7 +68,7 @@ namespace
const tr1::shared_ptr<const PackageID> & i,
const tr1::shared_ptr<const ERepository> o,
const std::set<KeywordName> & a,
- const ERepository::ProfilesIterator & p,
+ const ERepository::ProfilesConstIterator & p,
const std::string & n,
const bool u,
const tr1::shared_ptr<const MetadataKey> & k) :
@@ -107,7 +107,7 @@ namespace
/* rewrite virtuals to avoid problems later on */
if (p->package_ptr())
{
- ERepositoryProfile::VirtualsIterator v(profile->profile->find_virtual(*p->package_ptr()));
+ ERepositoryProfile::VirtualsConstIterator v(profile->profile->find_virtual(*p->package_ptr()));
if (profile->profile->end_virtuals() != v)
{
tr1::shared_ptr<VersionRequirements> reqs;
@@ -157,7 +157,7 @@ namespace
}
else
{
- for (PackageIDSequence::Iterator i(matches->begin()), i_end(matches->end()) ;
+ for (PackageIDSequence::ConstIterator i(matches->begin()), i_end(matches->end()) ;
i != i_end ; ++i)
{
/* can't use the usual masked rules here, so this gets a bit complicated... */
@@ -279,7 +279,7 @@ paludis::erepository::visibility_check(
if (repo->repository_masked(*id) || ! id->keywords_key())
return true;
- for (ERepository::ProfilesIterator p(repo->begin_profiles()), p_end(repo->end_profiles()) ;
+ for (ERepository::ProfilesConstIterator p(repo->begin_profiles()), p_end(repo->end_profiles()) ;
p != p_end ; ++p)
{
if (p->profile->profile_masked(*id))
diff --git a/paludis/repositories/e/source_uri_finder.cc b/paludis/repositories/e/source_uri_finder.cc
index 916ff4e..a817a09 100644
--- a/paludis/repositories/e/source_uri_finder.cc
+++ b/paludis/repositories/e/source_uri_finder.cc
@@ -65,16 +65,16 @@ SourceURIFinder::~SourceURIFinder()
{
}
-SourceURIFinder::Iterator
+SourceURIFinder::ConstIterator
SourceURIFinder::begin() const
{
- return Iterator(_imp->items.begin());
+ return ConstIterator(_imp->items.begin());
}
-SourceURIFinder::Iterator
+SourceURIFinder::ConstIterator
SourceURIFinder::end() const
{
- return Iterator(_imp->items.end());
+ return ConstIterator(_imp->items.end());
}
void
@@ -132,7 +132,7 @@ SourceURIFinder::add_local_mirrors()
if (mirrors->empty())
Log::get_instance()->message(ll_debug, lc_context) << "Mirrors set is empty";
- for (MirrorsSequence::Iterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
+ for (MirrorsSequence::ConstIterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
{
Log::get_instance()->message(ll_debug, lc_context) << "Adding " << strip_trailing(*m, "/") << "/" << _imp->filename;
_imp->items.push_back(std::make_pair(strip_trailing(*m, "/") + "/" + _imp->filename, _imp->filename));
@@ -148,7 +148,7 @@ SourceURIFinder::add_mirrors()
if (mirrors->empty())
Log::get_instance()->message(ll_debug, lc_context) << "Environment mirrors set is empty";
- for (MirrorsSequence::Iterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
+ for (MirrorsSequence::ConstIterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
{
Log::get_instance()->message(ll_debug, lc_context) << "Adding " << strip_trailing(*m, "/") << "/" << _imp->filename;
_imp->items.push_back(std::make_pair(strip_trailing(*m, "/") + "/" + _imp->filename, _imp->filename));
@@ -157,7 +157,7 @@ SourceURIFinder::add_mirrors()
{
Context local_context("When adding repository mirrors '" + _imp->mirrors_name + "':");
if (_imp->repo->mirrors_interface)
- for (RepositoryMirrorsInterface::MirrorsIterator m(_imp->repo->mirrors_interface->begin_mirrors(_imp->mirrors_name)),
+ for (RepositoryMirrorsInterface::MirrorsConstIterator m(_imp->repo->mirrors_interface->begin_mirrors(_imp->mirrors_name)),
m_end(_imp->repo->mirrors_interface->end_mirrors(_imp->mirrors_name)) ;
m != m_end ; ++m)
{
@@ -186,7 +186,7 @@ SourceURIFinder::add_listed()
tr1::shared_ptr<const MirrorsSequence> mirrors(_imp->env->mirrors(mirror));
if (mirrors->empty())
Log::get_instance()->message(ll_debug, lc_context) << "Mirrors set is empty";
- for (MirrorsSequence::Iterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
+ for (MirrorsSequence::ConstIterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
{
Log::get_instance()->message(ll_debug, lc_context) << "Adding " << strip_trailing(*m, "/") << "/" << original_name;
_imp->items.push_back(std::make_pair(strip_trailing(*m, "/") + "/" + original_name, _imp->filename));
@@ -196,7 +196,7 @@ SourceURIFinder::add_listed()
{
Context local_context("When adding from repository for listed mirror '" + mirror + "':");
if (_imp->repo->mirrors_interface)
- for (RepositoryMirrorsInterface::MirrorsIterator m(_imp->repo->mirrors_interface->begin_mirrors(mirror)),
+ for (RepositoryMirrorsInterface::MirrorsConstIterator m(_imp->repo->mirrors_interface->begin_mirrors(mirror)),
m_end(_imp->repo->mirrors_interface->end_mirrors(mirror)) ;
m != m_end ; ++m)
{
diff --git a/paludis/repositories/e/source_uri_finder.hh b/paludis/repositories/e/source_uri_finder.hh
index 250ae62..f9f9cae 100644
--- a/paludis/repositories/e/source_uri_finder.hh
+++ b/paludis/repositories/e/source_uri_finder.hh
@@ -51,9 +51,9 @@ namespace paludis
~SourceURIFinder();
- typedef libwrapiter::ForwardIterator<SourceURIFinder, const std::pair<std::string, std::string> > Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<SourceURIFinder, const std::pair<std::string, std::string> > ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
void visit(const URIMirrorsOnlyLabel &);
void visit(const URIMirrorsThenListedLabel &);
diff --git a/paludis/repositories/e/source_uri_finder_TEST.cc b/paludis/repositories/e/source_uri_finder_TEST.cc
index 2f73f00..a2b64da 100644
--- a/paludis/repositories/e/source_uri_finder_TEST.cc
+++ b/paludis/repositories/e/source_uri_finder_TEST.cc
@@ -45,7 +45,7 @@ namespace test_cases
URIMirrorsThenListedLabel label("mirrors-then-listed");
label.accept(f);
- SourceURIFinder::Iterator i(f.begin());
+ SourceURIFinder::ConstIterator i(f.begin());
TEST_CHECK(i != f.end());
TEST_CHECK_EQUAL(i->first, "http://example.com/path/input");
@@ -71,7 +71,7 @@ namespace test_cases
URIMirrorsThenListedLabel label("mirrors-then-listed");
label.accept(f);
- SourceURIFinder::Iterator i(f.begin());
+ SourceURIFinder::ConstIterator i(f.begin());
TEST_CHECK(i != f.end());
TEST_CHECK_EQUAL(i->first, "http://fake-repo/fake-repo/output");
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 9a56633..49a535b 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -146,7 +146,7 @@ TraditionalLayout::need_category_names() const
LineConfigFile cats(*i, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(cats.begin()), line_end(cats.end()) ;
+ for (LineConfigFile::ConstIterator line(cats.begin()), line_end(cats.end()) ;
line != line_end ; ++line)
{
try
@@ -551,7 +551,7 @@ TraditionalLayout::invalidate_masks()
Lock l(_imp->big_nasty_mutex);
for (IDMap::iterator it(_imp->ids.begin()), it_end(_imp->ids.end()); it_end != it; ++it)
- for (PackageIDSequence::Iterator it2(it->second->begin()), it2_end(it->second->end());
+ for (PackageIDSequence::ConstIterator it2(it->second->begin()), it2_end(it->second->end());
it2_end != it2; ++it2)
(*it2)->invalidate_masks();
}
diff --git a/paludis/repositories/e/use_desc.cc b/paludis/repositories/e/use_desc.cc
index 6ca96a5..3a370e5 100644
--- a/paludis/repositories/e/use_desc.cc
+++ b/paludis/repositories/e/use_desc.cc
@@ -45,7 +45,7 @@ namespace paludis
if (f.is_regular_file_or_symlink_to_regular_file())
{
LineConfigFile ff(f, LineConfigFileOptions());
- for (LineConfigFile::Iterator line(ff.begin()), line_end(ff.end()) ;
+ for (LineConfigFile::ConstIterator line(ff.begin()), line_end(ff.end()) ;
line != line_end ; ++line)
{
std::string::size_type p(line->find(" - "));
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index c8e1b0a..608a9d3 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -386,7 +386,7 @@ VDBRepository::perform_uninstall(const tr1::shared_ptr<const ERepositoryID> & id
tr1::shared_ptr<FSEntry> load_env(new FSEntry(pkg_dir / "environment.bz2"));
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_uninstall);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
if (phase->option("unmerge"))
@@ -469,7 +469,7 @@ VDBRepository::perform_config(const tr1::shared_ptr<const ERepositoryID> & id) c
tr1::shared_ptr<FSEntry> load_env(new FSEntry(pkg_dir / "environment.bz2"));
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_config);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
EbuildConfigCommand config_cmd(EbuildCommandParams::create()
@@ -514,7 +514,7 @@ VDBRepository::perform_info(const tr1::shared_ptr<const ERepositoryID> & id) con
EAPIPhases phases(id->eapi()->supported->ebuild_phases->ebuild_info);
- for (EAPIPhases::Iterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
{
if (phase->option("installed=false"))
@@ -542,7 +542,7 @@ VDBRepository::perform_info(const tr1::shared_ptr<const ERepositoryID> & id) con
/* try to find an info_vars file from any repo */
if (i == FSEntry("/dev/null"))
{
- for (PackageDatabase::RepositoryIterator r(_imp->params.environment->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->params.environment->package_database()->begin_repositories()),
r_end(_imp->params.environment->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
@@ -605,7 +605,7 @@ VDBRepository::do_package_set(const SetName & s) const
for (CategoryMap::const_iterator i(_imp->categories.begin()), i_end(_imp->categories.end()) ;
i != i_end ; ++i)
- for (QualifiedPackageNameSet::Iterator e(i->second->begin()), e_end(i->second->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator e(i->second->begin()), e_end(i->second->end()) ;
e != e_end ; ++e)
{
tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
@@ -881,7 +881,7 @@ VDBRepository::load_provided_using_cache() const
join(next(next(tokens.begin())), tokens.end(), " "), *EAPIData::get_instance()->eapi_from_string("paludis-1")));
pp->accept(f);
- for (DepSpecFlattener::Iterator p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
+ for (DepSpecFlattener::ConstIterator p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
result->push_back(RepositoryProvidesEntry::create()
.virtual_name(QualifiedPackageName((*p)->text()))
.provided_by(id));
@@ -914,7 +914,7 @@ VDBRepository::load_provided_the_slow_way() const
for (IDMap::const_iterator i(_imp->ids.begin()), i_end(_imp->ids.end()) ;
i != i_end ; ++i)
{
- for (PackageIDSequence::Iterator e(i->second->begin()), e_end(i->second->end()) ;
+ for (PackageIDSequence::ConstIterator e(i->second->begin()), e_end(i->second->end()) ;
e != e_end ; ++e)
{
Context loop_context("When loading VDB PROVIDEs entry for '" + stringify(**e) + "':");
@@ -928,7 +928,7 @@ VDBRepository::load_provided_the_slow_way() const
DepSpecFlattener f(_imp->params.environment, *e);
provide->accept(f);
- for (DepSpecFlattener::Iterator p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
+ for (DepSpecFlattener::ConstIterator p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
{
QualifiedPackageName pp((*p)->text());
@@ -1004,7 +1004,7 @@ VDBRepository::regenerate_provides_cache() const
for (IDMap::const_iterator i(_imp->ids.begin()), i_end(_imp->ids.end()) ;
i != i_end ; ++i)
{
- for (PackageIDSequence::Iterator e(i->second->begin()), e_end(i->second->end()) ;
+ for (PackageIDSequence::ConstIterator e(i->second->begin()), e_end(i->second->end()) ;
e != e_end ; ++e)
{
if (! (*e)->provide_key())
@@ -1253,7 +1253,7 @@ VDBRepository::package_id_if_exists(const QualifiedPackageName & q, const Versio
using namespace tr1::placeholders;
- PackageIDSequence::Iterator i(std::find_if(_imp->ids[q]->begin(), _imp->ids[q]->end(),
+ PackageIDSequence::ConstIterator i(std::find_if(_imp->ids[q]->begin(), _imp->ids[q]->end(),
tr1::bind(std::equal_to<VersionSpec>(), v, tr1::bind(tr1::mem_fn(&PackageID::version), _1))));
if (_imp->ids[q]->end() == i)
return tr1::shared_ptr<const ERepositoryID>();
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 4030c05..9ced042 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -73,15 +73,15 @@ FakeInstalledRepository::provided_packages() const
tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence);
tr1::shared_ptr<const CategoryNamePartSet> cats(category_names());
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs(package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> vers(package_ids(*p));
- for (PackageIDSequence::Iterator v(vers->begin()), v_end(vers->end()) ;
+ for (PackageIDSequence::ConstIterator v(vers->begin()), v_end(vers->end()) ;
v != v_end ; ++v)
{
if (! (*v)->provide_key())
@@ -90,7 +90,7 @@ FakeInstalledRepository::provided_packages() const
DepSpecFlattener f(environment(), *v);
(*v)->provide_key()->value()->accept(f);
- for (DepSpecFlattener::Iterator q(f.begin()), q_end(f.end()) ; q != q_end ; ++q)
+ for (DepSpecFlattener::ConstIterator q(f.begin()), q_end(f.end()) ; q != q_end ; ++q)
result->push_back(RepositoryProvidesEntry::create()
.virtual_name(QualifiedPackageName((*q)->text()))
.provided_by(*v));
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 90f5ac9..3dd6bd9 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -783,7 +783,7 @@ std::string
FakeMetadataIUseSetKey::pretty_print_flat(const Formatter<IUseFlag> & f) const
{
std::string result;
- for (IUseFlagSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (IUseFlagSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
@@ -809,7 +809,7 @@ FakeMetadataIUseSetKey::pretty_print_flat_with_comparison(
const Formatter<IUseFlag> & f) const
{
std::string result;
- for (IUseFlagSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (IUseFlagSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
@@ -844,7 +844,7 @@ FakeMetadataIUseSetKey::pretty_print_flat_with_comparison(
else
{
using namespace tr1::placeholders;
- IUseFlagSet::Iterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
+ IUseFlagSet::ConstIterator p(std::find_if(id->iuse_key()->value()->begin(), id->iuse_key()->value()->end(),
tr1::bind(std::equal_to<UseFlagName>(), i->flag, tr1::bind<const UseFlagName>(&IUseFlag::flag, _1))));
if (p == id->iuse_key()->value()->end())
@@ -864,7 +864,7 @@ std::string
FakeMetadataKeywordSetKey::pretty_print_flat(const Formatter<KeywordName> & f) const
{
std::string result;
- for (KeywordNameSet::Iterator i(value()->begin()), i_end(value()->end()) ;
+ for (KeywordNameSet::ConstIterator i(value()->begin()), i_end(value()->end()) ;
i != i_end ; ++i)
{
if (! result.empty())
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 219378b..03f25a6 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -159,15 +159,15 @@ FakeRepository::do_some_ids_might_support_action(const SupportsActionTestBase &
return q.result;
}
-FakeRepository::MirrorsIterator
+FakeRepository::MirrorsConstIterator
FakeRepository::begin_mirrors(const std::string & s) const
{
- return MirrorsIterator(_imp->mirrors.equal_range(s).first);
+ return MirrorsConstIterator(_imp->mirrors.equal_range(s).first);
}
-FakeRepository::MirrorsIterator
+FakeRepository::MirrorsConstIterator
FakeRepository::end_mirrors(const std::string & s) const
{
- return MirrorsIterator(_imp->mirrors.equal_range(s).second);
+ return MirrorsConstIterator(_imp->mirrors.equal_range(s).second);
}
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index c3aa54b..504db03 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -62,9 +62,9 @@ namespace paludis
/* RepositoryMirrorsInterface */
- virtual MirrorsIterator begin_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator begin_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual MirrorsIterator end_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator end_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index b7d1647..7eedf4b 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -119,7 +119,7 @@ FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
if (! has_category_named(c))
return result;
- PackageNamePartSet::Iterator p(_imp->package_names.find(c)->second->begin()),
+ PackageNamePartSet::ConstIterator p(_imp->package_names.find(c)->second->begin()),
p_end(_imp->package_names.find(c)->second->end());
for ( ; p != p_end ; ++p)
result->insert(c + *p);
@@ -194,7 +194,7 @@ FakeRepositoryBase::invalidate_masks()
{
for (std::map<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::iterator it(_imp->ids.begin()), it_end(_imp->ids.end());
it_end != it; ++it)
- for (PackageIDSequence::Iterator it2(it->second->begin()), it2_end(it->second->end());
+ for (PackageIDSequence::ConstIterator it2(it->second->begin()), it2_end(it->second->end());
it2_end != it2; ++it2)
(*it2)->invalidate_masks();
}
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index ac35ad9..397d6d2 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -145,7 +145,7 @@ namespace
void visit(const yaml::MapNode & n)
{
- yaml::MapNode::Iterator i(n.find("version"));
+ yaml::MapNode::ConstIterator i(n.find("version"));
if (i == n.end())
throw BadSpecificationError("Version has no version: key");
text = extract_text_only(*i->second, "for Version version: key");
@@ -186,7 +186,7 @@ namespace
throw BadSpecificationError("Found sequence rather than text " + extra);
bool w(false);
- for (yaml::SequenceNode::Iterator i(s.begin()), i_end(s.end()) ; i != i_end ; ++i)
+ for (yaml::SequenceNode::ConstIterator i(s.begin()), i_end(s.end()) ; i != i_end ; ++i)
{
if (w)
result.append(", ");
@@ -219,7 +219,7 @@ namespace
std::string required_text_only_key(const yaml::MapNode & n, const std::string & k)
{
- yaml::MapNode::Iterator i(n.find(k));
+ yaml::MapNode::ConstIterator i(n.find(k));
if (i == n.end())
throw BadSpecificationError("Key '" + k + "' not defined");
return extract_text_only(*i->second, "for key '" + k + "'");
@@ -227,7 +227,7 @@ namespace
std::string optional_text_sequence_key(const yaml::MapNode & n, const std::string & k)
{
- yaml::MapNode::Iterator i(n.find(k));
+ yaml::MapNode::ConstIterator i(n.find(k));
if (i == n.end())
return "";
return extract_text_sequence(*i->second, "for key '" + k + "'");
@@ -235,7 +235,7 @@ namespace
std::string optional_text_only_key(const yaml::MapNode & n, const std::string & k)
{
- yaml::MapNode::Iterator i(n.find(k));
+ yaml::MapNode::ConstIterator i(n.find(k));
if (i == n.end())
return "";
return extract_text_only(*i->second, "for key '" + k + "'");
@@ -243,7 +243,7 @@ namespace
std::string required_version(const yaml::MapNode & n, const std::string & k)
{
- yaml::MapNode::Iterator i(n.find(k));
+ yaml::MapNode::ConstIterator i(n.find(k));
if (i == n.end())
throw BadSpecificationError("Key '" + k + "' not defined");
diff --git a/paludis/repositories/gems/gem_specifications.cc b/paludis/repositories/gems/gem_specifications.cc
index 26cf24f..f3db1e3 100644
--- a/paludis/repositories/gems/gem_specifications.cc
+++ b/paludis/repositories/gems/gem_specifications.cc
@@ -73,7 +73,7 @@ namespace
throw BadSpecificationError("Found sequence rather than text " + extra);
bool w(false);
- for (yaml::SequenceNode::Iterator i(s.begin()), i_end(s.end()) ; i != i_end ; ++i)
+ for (yaml::SequenceNode::ConstIterator i(s.begin()), i_end(s.end()) ; i != i_end ; ++i)
{
if (w)
result.append(", ");
@@ -114,7 +114,7 @@ namespace
void visit(const yaml::MapNode & n)
{
- for (yaml::MapNode::Iterator i(n.begin()), i_end(n.end()) ; i != i_end ; ++i)
+ for (yaml::MapNode::ConstIterator i(n.begin()), i_end(n.end()) ; i != i_end ; ++i)
{
std::string pv(extract_text_only(*i->first, " as key for gem"));
Context c_item("When handling Gem entry '" + pv + "':");
@@ -164,7 +164,7 @@ namespace
void visit(const yaml::MapNode & n)
{
- yaml::MapNode::Iterator i(n.find("gems"));
+ yaml::MapNode::ConstIterator i(n.find("gems"));
if (n.end() == i)
throw BadSpecificationError("Top level map does not contain 'gems' node");
@@ -200,15 +200,15 @@ GemSpecifications::~GemSpecifications()
{
}
-GemSpecifications::Iterator
+GemSpecifications::ConstIterator
GemSpecifications::begin() const
{
- return Iterator(_imp->specs.begin());
+ return ConstIterator(_imp->specs.begin());
}
-GemSpecifications::Iterator
+GemSpecifications::ConstIterator
GemSpecifications::end() const
{
- return Iterator(_imp->specs.end());
+ return ConstIterator(_imp->specs.end());
}
diff --git a/paludis/repositories/gems/gem_specifications.hh b/paludis/repositories/gems/gem_specifications.hh
index 42a08a3..02563e0 100644
--- a/paludis/repositories/gems/gem_specifications.hh
+++ b/paludis/repositories/gems/gem_specifications.hh
@@ -60,9 +60,9 @@ namespace paludis
typedef libwrapiter::ForwardIterator<GemSpecifications,
const std::pair<const std::pair<QualifiedPackageName, VersionSpec>, tr1::shared_ptr<const GemSpecification> > >
- Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
};
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 2ce566b..d2514dd 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -117,7 +117,7 @@ GemsRepository::invalidate_masks()
for (MakeHashedMap<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::Type::iterator it(_imp->ids.begin()), it_end(_imp->ids.end());
it_end != it; ++it)
- for (PackageIDSequence::Iterator it2(it->second->begin()), it2_end(it->second->end());
+ for (PackageIDSequence::ConstIterator it2(it->second->begin()), it2_end(it->second->end());
it2_end != it2; ++it2)
(*it2)->invalidate_masks();
}
@@ -225,7 +225,7 @@ GemsRepository::need_ids() const
yaml::Document master_doc(output);
gems::GemSpecifications specs(_imp->params.environment, shared_from_this(), *master_doc.top());
- for (gems::GemSpecifications::Iterator i(specs.begin()), i_end(specs.end()) ;
+ for (gems::GemSpecifications::ConstIterator i(specs.begin()), i_end(specs.end()) ;
i != i_end ; ++i)
{
pkgs->insert(i->first.first);
diff --git a/paludis/repositories/gems/yaml.cc b/paludis/repositories/gems/yaml.cc
index 2ed6c94..f240d1b 100644
--- a/paludis/repositories/gems/yaml.cc
+++ b/paludis/repositories/gems/yaml.cc
@@ -90,16 +90,16 @@ SequenceNode::push_back(const Node * const n)
_imp->nodes.push_back(n);
}
-SequenceNode::Iterator
+SequenceNode::ConstIterator
SequenceNode::begin() const
{
- return Iterator(_imp->nodes.begin());
+ return ConstIterator(_imp->nodes.begin());
}
-SequenceNode::Iterator
+SequenceNode::ConstIterator
SequenceNode::end() const
{
- return Iterator(_imp->nodes.end());
+ return ConstIterator(_imp->nodes.end());
}
namespace paludis
@@ -126,16 +126,16 @@ MapNode::push_back(const std::pair<const Node *, const Node *> & p)
_imp->nodes.push_back(p);
}
-MapNode::Iterator
+MapNode::ConstIterator
MapNode::begin() const
{
- return Iterator(_imp->nodes.begin());
+ return ConstIterator(_imp->nodes.begin());
}
-MapNode::Iterator
+MapNode::ConstIterator
MapNode::end() const
{
- return Iterator(_imp->nodes.end());
+ return ConstIterator(_imp->nodes.end());
}
namespace
@@ -174,7 +174,7 @@ namespace
}
}
-MapNode::Iterator
+MapNode::ConstIterator
MapNode::find(const std::string & s) const
{
using namespace tr1::placeholders;
diff --git a/paludis/repositories/gems/yaml.hh b/paludis/repositories/gems/yaml.hh
index 6e3a20a..fe45512 100644
--- a/paludis/repositories/gems/yaml.hh
+++ b/paludis/repositories/gems/yaml.hh
@@ -124,9 +124,9 @@ namespace paludis
///\name Iterate over our child nodes.
///\{
- typedef libwrapiter::ForwardIterator<SequenceNode, const Node * const> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<SequenceNode, const Node * const> ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
};
@@ -159,10 +159,10 @@ namespace paludis
///\name Iterate over and find our child nodes.
///\{
- typedef libwrapiter::ForwardIterator<MapNode, const std::pair<const Node *, const Node *> > Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator find(const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<MapNode, const std::pair<const Node *, const Node *> > ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator find(const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
};
diff --git a/paludis/repositories/gems/yaml_TEST.cc b/paludis/repositories/gems/yaml_TEST.cc
index 9bad777..989f1d1 100644
--- a/paludis/repositories/gems/yaml_TEST.cc
+++ b/paludis/repositories/gems/yaml_TEST.cc
@@ -84,7 +84,7 @@ namespace
{
s << "map(";
bool w(false);
- for (MapNode::Iterator i(n.begin()), i_end(n.end()) ; i != i_end ; ++i)
+ for (MapNode::ConstIterator i(n.begin()), i_end(n.end()) ; i != i_end ; ++i)
{
if (w)
s << ", ";
@@ -101,7 +101,7 @@ namespace
{
s << "seq(";
bool w(false);
- for (SequenceNode::Iterator i(n.begin()), i_end(n.end()) ; i != i_end ; ++i)
+ for (SequenceNode::ConstIterator i(n.begin()), i_end(n.end()) ; i != i_end ; ++i)
{
if (w)
s << ", ";
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index d85da73..fa8f2aa 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -143,7 +143,7 @@ InstalledVirtualsRepository::need_ids() const
/* Populate our _imp->entries. We need to iterate over each repository in
* our env's package database, see if it has a provides interface, and if it
* does create an entry for each provided package. */
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
{
if (! (*r)->provides_interface)
@@ -152,7 +152,7 @@ InstalledVirtualsRepository::need_ids() const
tr1::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence> pp(
(*r)->provides_interface->provided_packages());
- for (RepositoryProvidesInterface::ProvidesSequence::Iterator p(
+ for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(
pp->begin()), p_end(pp->end()) ; p != p_end ; ++p)
{
IDMap::iterator i(_imp->ids.find(p->virtual_name));
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 22eed21..f10af86 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -155,7 +155,7 @@ VirtualsRepository::need_names() const
Log::get_instance()->message(ll_debug, lc_context, "VirtualsRepository need_names");
/* Determine our virtual name -> package mappings. */
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
{
if (! (*r)->provides_interface)
@@ -163,7 +163,7 @@ VirtualsRepository::need_names() const
tr1::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence> provides(
(*r)->provides_interface->provided_packages());
- for (RepositoryProvidesInterface::ProvidesSequence::Iterator p(provides->begin()),
+ for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(provides->begin()),
p_end(provides->end()) ; p != p_end ; ++p)
_imp->names.push_back(std::make_pair(p->virtual_name, tr1::shared_ptr<const PackageDepSpec>(
new PackageDepSpec(
@@ -175,7 +175,7 @@ VirtualsRepository::need_names() const
std::vector<std::pair<QualifiedPackageName, tr1::shared_ptr<const PackageDepSpec> > > new_names;
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
{
if (! (*r)->virtuals_interface)
@@ -183,7 +183,7 @@ VirtualsRepository::need_names() const
tr1::shared_ptr<const RepositoryVirtualsInterface::VirtualsSequence> virtuals(
(*r)->virtuals_interface->virtual_packages());
- for (RepositoryVirtualsInterface::VirtualsSequence::Iterator v(virtuals->begin()),
+ for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator v(virtuals->begin()),
v_end(virtuals->end()) ; v != v_end ; ++v)
{
std::pair<
@@ -232,7 +232,7 @@ VirtualsRepository::need_ids() const
+ stringify(*v->second) + "' for virtual '"
+ stringify(v->first) + "'");
- for (PackageIDSequence::Iterator m(matches->begin()), m_end(matches->end()) ;
+ for (PackageIDSequence::ConstIterator m(matches->begin()), m_end(matches->end()) ;
m != m_end ; ++m)
{
IDMap::iterator i(_imp->ids.find(v->first));
@@ -333,7 +333,7 @@ VirtualsRepository::invalidate_masks()
Lock l(*_imp->big_nasty_mutex);
for (IDMap::iterator it(_imp->ids.begin()), it_end(_imp->ids.end()); it_end != it; ++it)
- for (PackageIDSequence::Iterator it2(it->second->begin()), it2_end(it->second->end());
+ for (PackageIDSequence::ConstIterator it2(it->second->begin()), it2_end(it->second->end());
it2_end != it2; ++it2)
(*it2)->invalidate_masks();
}
diff --git a/paludis/repository.cc b/paludis/repository.cc
index c459131..fc74aa7 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -65,7 +65,7 @@ namespace
return;
LineConfigFile f(FSEntry(DATADIR) / "paludis" / "repository_blacklist.txt", LineConfigFileOptions());
- for (LineConfigFile::Iterator line(f.begin()), line_end(f.end()) ;
+ for (LineConfigFile::ConstIterator line(f.begin()), line_end(f.end()) ;
line != line_end ; ++line)
{
std::string::size_type p(line->find(" - "));
@@ -115,7 +115,7 @@ Repository::do_category_names_containing_package(const PackageNamePart & p) cons
tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
tr1::shared_ptr<const CategoryNamePartSet> cats(category_names());
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
if (has_package_named(*c + p))
result->insert(*c);
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 52bb1bb..fc743b8 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -537,11 +537,11 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<RepositoryMirrorsInterface,
- const std::pair<const std::string, std::string> > MirrorsIterator;
+ const std::pair<const std::string, std::string> > MirrorsConstIterator;
- virtual MirrorsIterator begin_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator begin_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual MirrorsIterator end_mirrors(const std::string & s) const
+ virtual MirrorsConstIterator end_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
/**
@@ -746,12 +746,12 @@ namespace paludis
typedef RepositoryEInterfaceProfilesDescLine ProfilesDescLine;
typedef libwrapiter::ForwardIterator<RepositoryEInterface,
- const ProfilesDescLine> ProfilesIterator;
- virtual ProfilesIterator begin_profiles() const = 0;
- virtual ProfilesIterator end_profiles() const = 0;
+ const ProfilesDescLine> ProfilesConstIterator;
+ virtual ProfilesConstIterator begin_profiles() const = 0;
+ virtual ProfilesConstIterator end_profiles() const = 0;
- virtual ProfilesIterator find_profile(const FSEntry & location) const = 0;
- virtual void set_profile(const ProfilesIterator & iter) = 0;
+ virtual ProfilesConstIterator find_profile(const FSEntry & location) const = 0;
+ virtual void set_profile(const ProfilesConstIterator & iter) = 0;
virtual void set_profile_by_arch(const UseFlagName &) = 0;
///\}
diff --git a/paludis/repository_info.cc b/paludis/repository_info.cc
index b135fb4..ddf5b6d 100644
--- a/paludis/repository_info.cc
+++ b/paludis/repository_info.cc
@@ -80,16 +80,16 @@ RepositoryInfoSection::heading() const
return _imp->heading;
}
-RepositoryInfoSection::KeyValueIterator
+RepositoryInfoSection::KeyValueConstIterator
RepositoryInfoSection::begin_kvs() const
{
- return KeyValueIterator(_imp->kvs.begin());
+ return KeyValueConstIterator(_imp->kvs.begin());
}
-RepositoryInfoSection::KeyValueIterator
+RepositoryInfoSection::KeyValueConstIterator
RepositoryInfoSection::end_kvs() const
{
- return KeyValueIterator(_imp->kvs.end());
+ return KeyValueConstIterator(_imp->kvs.end());
}
RepositoryInfoSection &
@@ -118,23 +118,23 @@ RepositoryInfo::~RepositoryInfo()
{
}
-RepositoryInfo::SectionIterator
+RepositoryInfo::SectionConstIterator
RepositoryInfo::begin_sections() const
{
- return SectionIterator(_imp->sections.begin());
+ return SectionConstIterator(_imp->sections.begin());
}
-RepositoryInfo::SectionIterator
+RepositoryInfo::SectionConstIterator
RepositoryInfo::end_sections() const
{
- return SectionIterator(_imp->sections.end());
+ return SectionConstIterator(_imp->sections.end());
}
std::string
RepositoryInfo::get_key_with_default(const std::string & k, const std::string & d) const
{
std::string result(d);
- for (SectionIterator i(begin_sections()), i_end(end_sections()) ; i != i_end ; ++i)
+ for (SectionConstIterator i(begin_sections()), i_end(end_sections()) ; i != i_end ; ++i)
result = (*i)->get_key_with_default(k, result);
return result;
}
diff --git a/paludis/repository_info.hh b/paludis/repository_info.hh
index df09010..2b6f7b7 100644
--- a/paludis/repository_info.hh
+++ b/paludis/repository_info.hh
@@ -52,12 +52,12 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<RepositoryInfoSection,
- const std::pair<const std::string, std::string> > KeyValueIterator;
+ const std::pair<const std::string, std::string> > KeyValueConstIterator;
- KeyValueIterator begin_kvs() const
+ KeyValueConstIterator begin_kvs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- KeyValueIterator end_kvs() const
+ KeyValueConstIterator end_kvs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
@@ -87,16 +87,16 @@ namespace paludis
///\}
- ///\name Iterator over our sections
+ ///\name ConstIterator over our sections
///\{
typedef libwrapiter::ForwardIterator<RepositoryInfo,
- const tr1::shared_ptr<const RepositoryInfoSection> > SectionIterator;
+ const tr1::shared_ptr<const RepositoryInfoSection> > SectionConstIterator;
- SectionIterator begin_sections() const
+ SectionConstIterator begin_sections() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- SectionIterator end_sections() const
+ SectionConstIterator end_sections() const
PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/repository_name_cache.cc b/paludis/repository_name_cache.cc
index f152e8a..e065f0f 100644
--- a/paludis/repository_name_cache.cc
+++ b/paludis/repository_name_cache.cc
@@ -178,11 +178,11 @@ RepositoryNameCache::regenerate_cache() const
MakeHashedMap<std::string, std::string>::Type m;
tr1::shared_ptr<const CategoryNamePartSet> cats(_imp->repo->category_names());
- for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs(_imp->repo->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
m[stringify(p->package)].append(stringify(*c) + "\n");
}
diff --git a/paludis/set_file.cc b/paludis/set_file.cc
index 42cc041..d565c23 100644
--- a/paludis/set_file.cc
+++ b/paludis/set_file.cc
@@ -248,7 +248,7 @@ SimpleHandler::SimpleHandler(const SetFileParams & p) :
LineConfigFile ff(_p.file_name, LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_disallow_comments
+ lcfo_no_skip_blank_lines);
- for (LineConfigFile::Iterator line(ff.begin()), line_end(ff.end()) ;
+ for (LineConfigFile::ConstIterator line(ff.begin()), line_end(ff.end()) ;
line != line_end ; ++line)
_lines.push_back(*line);
}
@@ -354,7 +354,7 @@ PaludisConfHandler::PaludisConfHandler(const SetFileParams & p) :
LineConfigFile ff(_p.file_name, LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_disallow_comments
+ lcfo_no_skip_blank_lines);
- for (LineConfigFile::Iterator line(ff.begin()), line_end(ff.end()) ;
+ for (LineConfigFile::ConstIterator line(ff.begin()), line_end(ff.end()) ;
line != line_end ; ++line)
_lines.push_back(*line);
}
@@ -436,7 +436,7 @@ PaludisBashHandler::PaludisBashHandler(const SetFileParams & p) :
LineConfigFile ff(s, LineConfigFileOptions() + lcfo_disallow_continuations + lcfo_disallow_comments
+ lcfo_no_skip_blank_lines);
- for (LineConfigFile::Iterator line(ff.begin()), line_end(ff.end()) ;
+ for (LineConfigFile::ConstIterator line(ff.begin()), line_end(ff.end()) ;
line != line_end ; ++line)
do_one_conf_line(*line, _contents, _p);
diff --git a/paludis/syncer.cc b/paludis/syncer.cc
index 9fd3797..20df58d 100644
--- a/paludis/syncer.cc
+++ b/paludis/syncer.cc
@@ -73,7 +73,7 @@ DefaultSyncer::DefaultSyncer(const SyncerParams & params)
tr1::shared_ptr<const FSEntrySequence> syncer_dirs(_environment->syncers_dirs());
FSEntry syncer("/var/empty");
bool ok(false);
- for (FSEntrySequence::Iterator d(syncer_dirs->begin()), d_end(syncer_dirs->end()) ;
+ for (FSEntrySequence::ConstIterator d(syncer_dirs->begin()), d_end(syncer_dirs->end()) ;
d != d_end && ! ok; ++d)
{
syncer = FSEntry(*d) / ("do" + format);
diff --git a/paludis/tasks/find_unused_packages_task.cc b/paludis/tasks/find_unused_packages_task.cc
index 1612c76..df956f4 100644
--- a/paludis/tasks/find_unused_packages_task.cc
+++ b/paludis/tasks/find_unused_packages_task.cc
@@ -56,7 +56,7 @@ FindUnusedPackagesTask::execute(const QualifiedPackageName & package)
SlotName old_slot("I_am_a_slot");
std::set<KeywordName> keywords;
- for (PackageIDSequence::ReverseIterator p(packages->rbegin()), p_end(packages->rend()) ;
+ for (PackageIDSequence::ReverseConstIterator p(packages->rbegin()), p_end(packages->rend()) ;
p != p_end ; ++p)
{
if (! (*p)->keywords_key())
@@ -70,7 +70,7 @@ FindUnusedPackagesTask::execute(const QualifiedPackageName & package)
tr1::shared_ptr<const KeywordNameSet> current_keywords((*p)->keywords_key()->value());
bool used(false);
- for (KeywordNameSet::Iterator k(current_keywords->begin()), k_end(current_keywords->end()) ;
+ for (KeywordNameSet::ConstIterator k(current_keywords->begin()), k_end(current_keywords->end()) ;
k != k_end ; ++k)
{
std::string stable_keyword(stringify(*k));
diff --git a/paludis/tasks/install_task.cc b/paludis/tasks/install_task.cc
index c9736d5..a361f70 100644
--- a/paludis/tasks/install_task.cc
+++ b/paludis/tasks/install_task.cc
@@ -448,7 +448,7 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
// manually invalidate any installed repos, they're probably
// wrong now
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
if ((*r)->installed_interface)
((*r).get())->invalidate();
@@ -472,7 +472,7 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
// don't clean the thing we just installed
PackageIDSequence clean_list;
if (collision_list)
- for (PackageIDSequence::Iterator c(collision_list->begin()),
+ for (PackageIDSequence::ConstIterator c(collision_list->begin()),
c_end(collision_list->end()) ; c != c_end ; ++c)
if (dep->package_id->version() != (*c)->version())
clean_list.push_back(*c);
@@ -491,7 +491,7 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
throw InstallActionError("Clean aborted by hook");
on_clean_all_pre(*dep, clean_list);
- for (PackageIDSequence::Iterator c(clean_list.begin()),
+ for (PackageIDSequence::ConstIterator c(clean_list.begin()),
c_end(clean_list.end()) ; c != c_end ; ++c)
{
/* clean one item */
@@ -823,16 +823,16 @@ InstallTask::set_add_to_world_spec(const std::string & value)
_imp->add_to_world_spec.reset(new std::string(value));
}
-InstallTask::TargetsIterator
+InstallTask::TargetsConstIterator
InstallTask::begin_targets() const
{
- return TargetsIterator(_imp->raw_targets.begin());
+ return TargetsConstIterator(_imp->raw_targets.begin());
}
-InstallTask::TargetsIterator
+InstallTask::TargetsConstIterator
InstallTask::end_targets() const
{
- return TargetsIterator(_imp->raw_targets.end());
+ return TargetsConstIterator(_imp->raw_targets.end());
}
Environment *
@@ -893,7 +893,7 @@ InstallTask::world_update_set(const SetName & s)
return;
}
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ;
r != r_end ; ++r)
if ((*r)->world_interface)
@@ -949,7 +949,7 @@ InstallTask::world_update_packages(tr1::shared_ptr<const SetSpecTree::ConstItem>
for (std::list<const PackageDepSpec *>::const_iterator i(w.items.begin()),
i_end(w.items.end()) ; i != i_end ; ++i)
{
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ;
r != r_end ; ++r)
if ((*r)->world_interface && (*i)->package_ptr())
diff --git a/paludis/tasks/install_task.hh b/paludis/tasks/install_task.hh
index f42ea31..ccb2b4c 100644
--- a/paludis/tasks/install_task.hh
+++ b/paludis/tasks/install_task.hh
@@ -98,9 +98,9 @@ namespace paludis
bool had_package_targets() const PALUDIS_ATTRIBUTE((warn_unused_result));
void override_target_type(const DepListTargetType);
- typedef libwrapiter::ForwardIterator<InstallTask, const std::string> TargetsIterator;
- TargetsIterator begin_targets() const PALUDIS_ATTRIBUTE((warn_unused_result));
- TargetsIterator end_targets() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<InstallTask, const std::string> TargetsConstIterator;
+ TargetsConstIterator begin_targets() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ TargetsConstIterator end_targets() const PALUDIS_ATTRIBUTE((warn_unused_result));
///\}
diff --git a/paludis/tasks/report_task.cc b/paludis/tasks/report_task.cc
index 15f5b12..08386f6 100644
--- a/paludis/tasks/report_task.cc
+++ b/paludis/tasks/report_task.cc
@@ -81,7 +81,7 @@ namespace
{
tr1::shared_ptr<const PackageIDSequence> insecure(
_env.package_database()->query(query::Matches(a), qo_order_by_version));
- for (PackageIDSequence::Iterator i(insecure->begin()),
+ for (PackageIDSequence::ConstIterator i(insecure->begin()),
i_end(insecure->end()) ; i != i_end ; ++i)
if (a.tag())
_found.insert(std::make_pair(*i, a.tag()));
@@ -124,7 +124,7 @@ ReportTask::execute()
bool once(true);
VulnerableChecker vuln(*e);
- for (PackageDatabase::RepositoryIterator r(e->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(e->package_database()->begin_repositories()),
r_end(e->package_database()->end_repositories()) ; r != r_end ; ++r)
{
tr1::shared_ptr<const Repository> rr(e->package_database()->fetch_repository((*r)->name()));
@@ -152,12 +152,12 @@ ReportTask::execute()
UninstallList unused_list(e, UninstallListOptions());
unused_list.add_unused();
std::set<tr1::shared_ptr<const PackageID>, PackageIDSetComparator> unused;
- for (UninstallList::Iterator i(unused_list.begin()), i_end(unused_list.end());
+ for (UninstallList::ConstIterator i(unused_list.begin()), i_end(unused_list.end());
i != i_end ; ++i)
if (i->kind != ulk_virtual)
unused.insert(i->package_id);
- for (PackageDatabase::RepositoryIterator r(e->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(e->package_database()->begin_repositories()),
r_end(e->package_database()->end_repositories()) ; r != r_end ; ++r)
{
tr1::shared_ptr<const Repository> rr(e->package_database()->fetch_repository((*r)->name()));
@@ -165,17 +165,17 @@ ReportTask::execute()
continue;
tr1::shared_ptr<const CategoryNamePartSet> cat_names(rr->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> packages(rr->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(packages->begin()), p_end(packages->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(packages->begin()), p_end(packages->end()) ;
p != p_end ; ++p)
{
on_report_check_package_pre(*p);
tr1::shared_ptr<const PackageIDSequence> ids(rr->package_ids(*p));
- for (PackageIDSequence::Iterator v(ids->begin()), v_end(ids->end()) ;
+ for (PackageIDSequence::ConstIterator v(ids->begin()), v_end(ids->end()) ;
v != v_end ; ++v)
{
bool is_missing(false);
diff --git a/paludis/tasks/stage_builder_task.cc b/paludis/tasks/stage_builder_task.cc
index 16322e4..268eab5 100644
--- a/paludis/tasks/stage_builder_task.cc
+++ b/paludis/tasks/stage_builder_task.cc
@@ -69,16 +69,16 @@ StageBuilderTask::queue_stage(tr1::shared_ptr<const StageBase> p)
_imp->stages.push_back(p);
}
-StageBuilderTask::StageIterator
+StageBuilderTask::StageConstIterator
StageBuilderTask::begin_stages() const
{
- return StageIterator(_imp->stages.begin());
+ return StageConstIterator(_imp->stages.begin());
}
-StageBuilderTask::StageIterator
+StageBuilderTask::StageConstIterator
StageBuilderTask::end_stages() const
{
- return StageIterator(_imp->stages.end());
+ return StageConstIterator(_imp->stages.end());
}
void
diff --git a/paludis/tasks/stage_builder_task.hh b/paludis/tasks/stage_builder_task.hh
index c066bb3..107d956 100644
--- a/paludis/tasks/stage_builder_task.hh
+++ b/paludis/tasks/stage_builder_task.hh
@@ -113,9 +113,9 @@ namespace paludis
///\name Iterate over our stages
///\{
- typedef libwrapiter::ForwardIterator<StageBuilderTask, const tr1::shared_ptr<const StageBase> > StageIterator;
- StageIterator begin_stages() const;
- StageIterator end_stages() const;
+ typedef libwrapiter::ForwardIterator<StageBuilderTask, const tr1::shared_ptr<const StageBase> > StageConstIterator;
+ StageConstIterator begin_stages() const;
+ StageConstIterator end_stages() const;
///\}
diff --git a/paludis/tasks/sync_task.cc b/paludis/tasks/sync_task.cc
index e5d6b8a..a6b755c 100644
--- a/paludis/tasks/sync_task.cc
+++ b/paludis/tasks/sync_task.cc
@@ -65,7 +65,7 @@ SyncTask::execute()
Context context("When executing sync task:");
if (_imp->targets.empty())
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
_imp->targets.push_back((*r)->name());
@@ -118,15 +118,15 @@ SyncTask::execute()
throw SyncFailedError("Sync aborted by hook");
}
-SyncTask::TargetsIterator
+SyncTask::TargetsConstIterator
SyncTask::begin_targets() const
{
- return TargetsIterator(_imp->targets.begin());
+ return TargetsConstIterator(_imp->targets.begin());
}
-SyncTask::TargetsIterator
+SyncTask::TargetsConstIterator
SyncTask::end_targets() const
{
- return TargetsIterator(_imp->targets.end());
+ return TargetsConstIterator(_imp->targets.end());
}
diff --git a/paludis/tasks/sync_task.hh b/paludis/tasks/sync_task.hh
index 61e5e1b..6e923f6 100644
--- a/paludis/tasks/sync_task.hh
+++ b/paludis/tasks/sync_task.hh
@@ -79,9 +79,9 @@ namespace paludis
///\name Target iteration
///\{
- typedef libwrapiter::ForwardIterator<SyncTask, const RepositoryName> TargetsIterator;
- TargetsIterator begin_targets() const;
- TargetsIterator end_targets() const;
+ typedef libwrapiter::ForwardIterator<SyncTask, const RepositoryName> TargetsConstIterator;
+ TargetsConstIterator begin_targets() const;
+ TargetsConstIterator end_targets() const;
///\}
diff --git a/paludis/tasks/uninstall_task.cc b/paludis/tasks/uninstall_task.cc
index 7d7bca4..bd863a1 100644
--- a/paludis/tasks/uninstall_task.cc
+++ b/paludis/tasks/uninstall_task.cc
@@ -55,16 +55,16 @@ AmbiguousUnmergeTargetError::~AmbiguousUnmergeTargetError() throw ()
{
}
-AmbiguousUnmergeTargetError::Iterator
+AmbiguousUnmergeTargetError::ConstIterator
AmbiguousUnmergeTargetError::begin() const
{
- return Iterator(_p->begin());
+ return ConstIterator(_p->begin());
}
-AmbiguousUnmergeTargetError::Iterator
+AmbiguousUnmergeTargetError::ConstIterator
AmbiguousUnmergeTargetError::end() const
{
- return Iterator(_p->end());
+ return ConstIterator(_p->end());
}
std::string
@@ -177,7 +177,7 @@ UninstallTask::add_target(const std::string & target)
_imp->had_set_targets = true;
DepSpecFlattener f(_imp->env, tr1::shared_ptr<const PackageID>());
spec->accept(f);
- for (DepSpecFlattener::Iterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
+ for (DepSpecFlattener::ConstIterator i(f.begin()), i_end(f.end()) ; i != i_end ; ++i)
_imp->targets.push_back(tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(
stringify((*i)->text()), pds_pm_permissive)));
}
@@ -261,12 +261,12 @@ UninstallTask::execute()
if (_imp->all_versions)
{
/* all_versions, not all_packages. */
- for (PackageIDSequence::Iterator i_start(r->begin()), i(r->begin()),
+ for (PackageIDSequence::ConstIterator i_start(r->begin()), i(r->begin()),
i_end(r->end()) ; i != i_end ; ++i)
if ((*i)->name() != (*i_start)->name())
throw AmbiguousUnmergeTargetError(stringify(**t), r);
- for (PackageIDSequence::Iterator i(r->begin()), i_end(r->end()) ;
+ for (PackageIDSequence::ConstIterator i(r->begin()), i_end(r->end()) ;
i != i_end ; ++i)
list.add(*i);
}
@@ -281,7 +281,7 @@ UninstallTask::execute()
on_display_unmerge_list_pre();
- for (UninstallList::Iterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
+ for (UninstallList::ConstIterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
on_display_unmerge_list_entry(*i);
on_display_unmerge_list_post();
@@ -305,7 +305,7 @@ UninstallTask::execute()
tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
std::map<QualifiedPackageName, std::set<VersionSpec> > being_removed;
- for (UninstallList::Iterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
+ for (UninstallList::ConstIterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
if (i->kind != ulk_virtual)
being_removed[i->package_id->name()].insert(i->package_id->version());
@@ -318,7 +318,7 @@ UninstallTask::execute()
tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(i->first)))) &
query::SupportsAction<InstalledAction>(),
qo_whatever));
- for (PackageIDSequence::Iterator r(installed->begin()), r_end(installed->end()) ;
+ for (PackageIDSequence::ConstIterator r(installed->begin()), r_end(installed->end()) ;
r != r_end && remove ; ++r)
if (i->second.end() == i->second.find((*r)->version()))
remove = false;
@@ -346,11 +346,11 @@ UninstallTask::execute()
on_uninstall_all_pre();
int x(0), y(0);
- for (UninstallList::Iterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
+ for (UninstallList::ConstIterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
if (i->kind != ulk_virtual)
++y;
- for (UninstallList::Iterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
+ for (UninstallList::ConstIterator i(list.begin()), i_end(list.end()) ; i != i_end ; ++i)
{
if (i->kind == ulk_virtual)
continue;
@@ -410,7 +410,7 @@ UninstallTask::set_all_versions(const bool value)
void
UninstallTask::world_remove_set(const SetName & s)
{
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ;
r != r_end ; ++r)
if ((*r)->world_interface)
@@ -459,7 +459,7 @@ UninstallTask::world_remove_packages(tr1::shared_ptr<const SetSpecTree::ConstIte
for (std::list<const PackageDepSpec *>::const_iterator i(w.items.begin()),
i_end(w.items.end()) ; i != i_end ; ++i)
{
- for (PackageDatabase::RepositoryIterator r(_imp->env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
r_end(_imp->env->package_database()->end_repositories()) ;
r != r_end ; ++r)
if ((*r)->world_interface && (*i)->package_ptr())
diff --git a/paludis/tasks/uninstall_task.hh b/paludis/tasks/uninstall_task.hh
index 0a97975..77e859b 100644
--- a/paludis/tasks/uninstall_task.hh
+++ b/paludis/tasks/uninstall_task.hh
@@ -57,9 +57,9 @@ namespace paludis
///\name Iterate over our entries
///\{
- typedef libwrapiter::ForwardIterator<AmbiguousUnmergeTargetError, const tr1::shared_ptr<const PackageID> > Iterator;
- Iterator begin() const;
- Iterator end() const;
+ typedef libwrapiter::ForwardIterator<AmbiguousUnmergeTargetError, const tr1::shared_ptr<const PackageID> > ConstIterator;
+ ConstIterator begin() const;
+ ConstIterator end() const;
///\}
diff --git a/paludis/util/graph-impl.hh b/paludis/util/graph-impl.hh
index 8310b4b..d38b7c0 100644
--- a/paludis/util/graph-impl.hh
+++ b/paludis/util/graph-impl.hh
@@ -54,16 +54,16 @@ namespace paludis
///\name Iterate over our nodes
///\{
- typedef libwrapiter::ForwardIterator<RemainingNodes, const std::string> Iterator;
+ typedef libwrapiter::ForwardIterator<RemainingNodes, const std::string> ConstIterator;
- Iterator begin() const
+ ConstIterator begin() const
{
- return Iterator(_n.begin());
+ return ConstIterator(_n.begin());
}
- Iterator end() const
+ ConstIterator end() const
{
- return Iterator(_n.end());
+ return ConstIterator(_n.end());
}
///\}
@@ -145,14 +145,14 @@ namespace paludis
* \nosubgrouping
*/
template <typename Node_, typename Edge_>
- class DirectedGraph<Node_, Edge_>::NodeIterator
+ class DirectedGraph<Node_, Edge_>::NodeConstIterator
{
friend class DirectedGraph<Node_, Edge_>;
private:
typename std::map<Node_, std::map<Node_, Edge_> >::const_iterator _i;
- NodeIterator(const typename std::map<Node_, std::map<Node_, Edge_> >::const_iterator & i) :
+ NodeConstIterator(const typename std::map<Node_, std::map<Node_, Edge_> >::const_iterator & i) :
_i(i)
{
}
@@ -161,12 +161,12 @@ namespace paludis
///\name Basic operations
///\{
- NodeIterator(const NodeIterator & other) :
+ NodeConstIterator(const NodeConstIterator & other) :
_i(other._i)
{
}
- ~NodeIterator()
+ ~NodeConstIterator()
{
}
@@ -175,12 +175,12 @@ namespace paludis
///\name Comparison operators
///\{
- bool operator== (const NodeIterator & other) const
+ bool operator== (const NodeConstIterator & other) const
{
return _i == other._i;
}
- bool operator!= (const NodeIterator & other) const
+ bool operator!= (const NodeConstIterator & other) const
{
return ! operator== (other);
}
@@ -190,15 +190,15 @@ namespace paludis
///\name Advance operators
///\{
- NodeIterator & operator++ ()
+ NodeConstIterator & operator++ ()
{
++_i;
return *this;
}
- NodeIterator operator++ (int)
+ NodeConstIterator operator++ (int)
{
- NodeIterator tmp(*this);
+ NodeConstIterator tmp(*this);
++_i;
return tmp;
}
@@ -222,17 +222,17 @@ namespace paludis
};
template <typename Node_, typename Edge_>
- typename DirectedGraph<Node_, Edge_>::NodeIterator
+ typename DirectedGraph<Node_, Edge_>::NodeConstIterator
DirectedGraph<Node_, Edge_>::begin_nodes() const
{
- return NodeIterator(_imp->store.begin());
+ return NodeConstIterator(_imp->store.begin());
}
template <typename Node_, typename Edge_>
- typename DirectedGraph<Node_, Edge_>::NodeIterator
+ typename DirectedGraph<Node_, Edge_>::NodeConstIterator
DirectedGraph<Node_, Edge_>::end_nodes() const
{
- return NodeIterator(_imp->store.end());
+ return NodeConstIterator(_imp->store.end());
}
template <typename Node_, typename Edge_>
@@ -313,9 +313,9 @@ namespace paludis
}
template <typename Node_, typename Edge_>
- template <typename OutputIterator_>
+ template <typename OutputConstIterator_>
void
- DirectedGraph<Node_, Edge_>::topological_sort(OutputIterator_ x) const
+ DirectedGraph<Node_, Edge_>::topological_sort(OutputConstIterator_ x) const
{
struct Sorter
{
@@ -327,7 +327,7 @@ namespace paludis
{
}
- void do_one(OutputIterator_ & i, const Node_ & n)
+ void do_one(OutputConstIterator_ & i, const Node_ & n)
{
if (done.end() != done.find(n))
return;
@@ -338,7 +338,7 @@ namespace paludis
*i++ = n;
done.insert(n);
- for (typename DirectedGraph::NodeIterator m(g.begin_nodes()), m_end(g.end_nodes()) ; m != m_end ; )
+ for (typename DirectedGraph::NodeConstIterator m(g.begin_nodes()), m_end(g.end_nodes()) ; m != m_end ; )
if (g.has_edge(*m, n))
{
g.delete_edge(*m, n);
@@ -348,10 +348,10 @@ namespace paludis
++m;
}
- void sort(OutputIterator_ & i)
+ void sort(OutputConstIterator_ & i)
{
unsigned c(0);
- for (typename DirectedGraph::NodeIterator n(g.begin_nodes()), n_end(g.end_nodes()) ; n != n_end ; )
+ for (typename DirectedGraph::NodeConstIterator n(g.begin_nodes()), n_end(g.end_nodes()) ; n != n_end ; )
{
++c;
do_one(i, *n++);
@@ -361,7 +361,7 @@ namespace paludis
{
tr1::shared_ptr<NoGraphTopologicalOrderExistsError::RemainingNodes> r(
new NoGraphTopologicalOrderExistsError::RemainingNodes);
- for (typename DirectedGraph::NodeIterator n(g.begin_nodes()), n_end(g.end_nodes()) ; n != n_end ; ++n)
+ for (typename DirectedGraph::NodeConstIterator n(g.begin_nodes()), n_end(g.end_nodes()) ; n != n_end ; ++n)
if (done.end() == done.find(*n))
r->add(stringify(*n));
diff --git a/paludis/util/graph.hh b/paludis/util/graph.hh
index 84e5723..ce7f44c 100644
--- a/paludis/util/graph.hh
+++ b/paludis/util/graph.hh
@@ -176,9 +176,9 @@ namespace paludis
///\name Iterate over our nodes
///\{
- class NodeIterator;
- NodeIterator begin_nodes() const;
- NodeIterator end_nodes() const;
+ class NodeConstIterator;
+ NodeConstIterator begin_nodes() const;
+ NodeConstIterator end_nodes() const;
///\}
diff --git a/paludis/util/map-impl.hh b/paludis/util/map-impl.hh
index 377cf76..00fdee1 100644
--- a/paludis/util/map-impl.hh
+++ b/paludis/util/map-impl.hh
@@ -56,24 +56,24 @@ paludis::Map<K_, V_, C_>::~Map()
}
template <typename K_, typename V_, typename C_>
-typename paludis::Map<K_, V_, C_>::Iterator
+typename paludis::Map<K_, V_, C_>::ConstIterator
paludis::Map<K_, V_, C_>::begin() const
{
- return Iterator(_imp->map.begin());
+ return ConstIterator(_imp->map.begin());
}
template <typename K_, typename V_, typename C_>
-typename paludis::Map<K_, V_, C_>::Iterator
+typename paludis::Map<K_, V_, C_>::ConstIterator
paludis::Map<K_, V_, C_>::end() const
{
- return Iterator(_imp->map.end());
+ return ConstIterator(_imp->map.end());
}
template <typename K_, typename V_, typename C_>
-typename paludis::Map<K_, V_, C_>::Iterator
+typename paludis::Map<K_, V_, C_>::ConstIterator
paludis::Map<K_, V_, C_>::find(const K_ & k) const
{
- return Iterator(_imp->map.find(k));
+ return ConstIterator(_imp->map.find(k));
}
template <typename K_, typename V_, typename C_>
@@ -106,7 +106,7 @@ paludis::Map<K_, V_, C_>::insert(const K_ & k, const V_ & v)
template <typename K_, typename V_, typename C_>
void
-paludis::Map<K_, V_, C_>::erase(const typename paludis::Map<K_, V_, C_>::Iterator & i)
+paludis::Map<K_, V_, C_>::erase(const typename paludis::Map<K_, V_, C_>::ConstIterator & i)
{
_imp->map.erase(i->first);
}
diff --git a/paludis/util/map.hh b/paludis/util/map.hh
index 8319fb2..1681a9b 100644
--- a/paludis/util/map.hh
+++ b/paludis/util/map.hh
@@ -44,10 +44,10 @@ namespace paludis
Map();
~Map();
- typedef libwrapiter::ForwardIterator<Map<K_, V_, C_>, const std::pair<const K_, V_> > Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator find(const K_ &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<Map<K_, V_, C_>, const std::pair<const K_, V_> > ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator find(const K_ &) const PALUDIS_ATTRIBUTE((warn_unused_result));
typedef libwrapiter::OutputIterator<Map<K_, V_, C_>, std::pair<const K_, V_> > Inserter;
Inserter inserter() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -56,7 +56,7 @@ namespace paludis
unsigned size() const PALUDIS_ATTRIBUTE((warn_unused_result));
void insert(const K_ &, const V_ &);
- void erase(const Iterator &);
+ void erase(const ConstIterator &);
void erase(const K_ &);
};
}
diff --git a/paludis/util/pstream.cc b/paludis/util/pstream.cc
index 9450146..844c154 100644
--- a/paludis/util/pstream.cc
+++ b/paludis/util/pstream.cc
@@ -77,7 +77,7 @@ PStreamInBuf::PStreamInBuf(const Command & cmd) :
if (! cmd.chdir().empty())
extras.append(" [chdir " + cmd.chdir() + "]");
- for (Command::Iterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
+ for (Command::ConstIterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
extras.append(" [setenv " + s->first + "=" + s->second + "]");
if (cmd.gid() && *cmd.gid() != getgid())
@@ -110,7 +110,7 @@ PStreamInBuf::PStreamInBuf(const Command & cmd) :
if (-1 == chdir(cmd.chdir().c_str()))
throw RunCommandError("chdir failed: " + stringify(strerror(errno)));
- for (Command::Iterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
+ for (Command::ConstIterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
setenv(s->first.c_str(), s->second.c_str(), 1);
if (-1 == dup2(stdout_pipe.write_fd(), 1))
diff --git a/paludis/util/sequence-impl.hh b/paludis/util/sequence-impl.hh
index 851b61e..d89bbee 100644
--- a/paludis/util/sequence-impl.hh
+++ b/paludis/util/sequence-impl.hh
@@ -49,38 +49,38 @@ paludis::Sequence<T_>::~Sequence()
}
template <typename T_>
-typename paludis::Sequence<T_>::Iterator
+typename paludis::Sequence<T_>::ConstIterator
paludis::Sequence<T_>::begin() const
{
- return Iterator(_imp->list.begin());
+ return ConstIterator(_imp->list.begin());
}
template <typename T_>
-typename paludis::Sequence<T_>::Iterator
+typename paludis::Sequence<T_>::ConstIterator
paludis::Sequence<T_>::end() const
{
- return Iterator(_imp->list.end());
+ return ConstIterator(_imp->list.end());
}
template <typename T_>
-typename paludis::Sequence<T_>::Iterator
+typename paludis::Sequence<T_>::ConstIterator
paludis::Sequence<T_>::last() const
{
- return Iterator(_imp->list.begin() == _imp->list.end() ? _imp->list.end() : --(_imp->list.end()));
+ return ConstIterator(_imp->list.begin() == _imp->list.end() ? _imp->list.end() : --(_imp->list.end()));
}
template <typename T_>
-typename paludis::Sequence<T_>::ReverseIterator
+typename paludis::Sequence<T_>::ReverseConstIterator
paludis::Sequence<T_>::rbegin() const
{
- return ReverseIterator(_imp->list.rbegin());
+ return ReverseConstIterator(_imp->list.rbegin());
}
template <typename T_>
-typename paludis::Sequence<T_>::ReverseIterator
+typename paludis::Sequence<T_>::ReverseConstIterator
paludis::Sequence<T_>::rend() const
{
- return ReverseIterator(_imp->list.rend());
+ return ReverseConstIterator(_imp->list.rend());
}
template <typename T_>
diff --git a/paludis/util/sequence.hh b/paludis/util/sequence.hh
index d83416f..33bf086 100644
--- a/paludis/util/sequence.hh
+++ b/paludis/util/sequence.hh
@@ -45,15 +45,15 @@ namespace paludis
Sequence();
~Sequence();
- typedef libwrapiter::ForwardIterator<Sequence<T_>, const T_> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator last() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<Sequence<T_>, const T_> ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator last() const PALUDIS_ATTRIBUTE((warn_unused_result));
- struct ReverseIteratorTag;
- typedef libwrapiter::ForwardIterator<typename Sequence<T_>::ReverseIteratorTag, const T_> ReverseIterator;
- ReverseIterator rbegin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- ReverseIterator rend() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ struct ReverseConstIteratorTag;
+ typedef libwrapiter::ForwardIterator<typename Sequence<T_>::ReverseConstIteratorTag, const T_> ReverseConstIterator;
+ ReverseConstIterator rbegin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ReverseConstIterator rend() const PALUDIS_ATTRIBUTE((warn_unused_result));
bool empty() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/util/set-impl.hh b/paludis/util/set-impl.hh
index 467770d..d3f354f 100644
--- a/paludis/util/set-impl.hh
+++ b/paludis/util/set-impl.hh
@@ -55,24 +55,24 @@ paludis::Set<T_, C_>::~Set()
}
template <typename T_, typename C_>
-typename paludis::Set<T_, C_>::Iterator
+typename paludis::Set<T_, C_>::ConstIterator
paludis::Set<T_, C_>::begin() const
{
- return Iterator(_imp->set.begin());
+ return ConstIterator(_imp->set.begin());
}
template <typename T_, typename C_>
-typename paludis::Set<T_, C_>::Iterator
+typename paludis::Set<T_, C_>::ConstIterator
paludis::Set<T_, C_>::end() const
{
- return Iterator(_imp->set.end());
+ return ConstIterator(_imp->set.end());
}
template <typename T_, typename C_>
-typename paludis::Set<T_, C_>::Iterator
+typename paludis::Set<T_, C_>::ConstIterator
paludis::Set<T_, C_>::find(const T_ & t) const
{
- return Iterator(_imp->set.find(t));
+ return ConstIterator(_imp->set.find(t));
}
template <typename T_, typename C_>
diff --git a/paludis/util/set.hh b/paludis/util/set.hh
index 4ca949e..be20208 100644
--- a/paludis/util/set.hh
+++ b/paludis/util/set.hh
@@ -46,10 +46,10 @@ namespace paludis
Set();
~Set();
- typedef libwrapiter::ForwardIterator<Set<T_, C_>, const T_> Iterator;
- Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator find(const T_ &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ typedef libwrapiter::ForwardIterator<Set<T_, C_>, const T_> ConstIterator;
+ ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator find(const T_ &) const PALUDIS_ATTRIBUTE((warn_unused_result));
bool empty() const PALUDIS_ATTRIBUTE((warn_unused_result));
unsigned size() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 4706fe8..8d97e08 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -277,7 +277,7 @@ paludis::run_command(const Command & cmd)
if (! cmd.chdir().empty())
extras.append(" [chdir " + cmd.chdir() + "]");
- for (Command::Iterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
+ for (Command::ConstIterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
extras.append(" [setenv " + s->first + "=" + s->second + "]");
if (cmd.gid() && *cmd.gid() != getgid())
@@ -308,7 +308,7 @@ paludis::run_command(const Command & cmd)
if (-1 == chdir(stringify(cmd.chdir()).c_str()))
throw RunCommandError("chdir failed: " + stringify(strerror(errno)));
- for (Command::Iterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
+ for (Command::ConstIterator s(cmd.begin_setenvs()), s_end(cmd.end_setenvs()) ; s != s_end ; ++s)
setenv(s->first.c_str(), s->second.c_str(), 1);
if (-1 != stdout_write_fd)
@@ -392,16 +392,16 @@ Command::chdir() const
return _imp->chdir;
}
-Command::Iterator
+Command::ConstIterator
Command::begin_setenvs() const
{
- return Iterator(_imp->setenv_values.begin());
+ return ConstIterator(_imp->setenv_values.begin());
}
-Command::Iterator
+Command::ConstIterator
Command::end_setenvs() const
{
- return Iterator(_imp->setenv_values.end());
+ return ConstIterator(_imp->setenv_values.end());
}
void
diff --git a/paludis/util/system.hh b/paludis/util/system.hh
index df6aa94..fce3e4c 100644
--- a/paludis/util/system.hh
+++ b/paludis/util/system.hh
@@ -222,9 +222,9 @@ namespace paludis
///\name Iterate over our setenvs.
///\{
- typedef libwrapiter::ForwardIterator<Command, const std::pair<const std::string, std::string> > Iterator;
- Iterator begin_setenvs() const;
- Iterator end_setenvs() const;
+ typedef libwrapiter::ForwardIterator<Command, const std::pair<const std::string, std::string> > ConstIterator;
+ ConstIterator begin_setenvs() const;
+ ConstIterator end_setenvs() const;
///\}
};
diff --git a/paludis/util/visitor-fwd.hh b/paludis/util/visitor-fwd.hh
index abedecd..805418e 100644
--- a/paludis/util/visitor-fwd.hh
+++ b/paludis/util/visitor-fwd.hh
@@ -30,13 +30,13 @@ namespace paludis
class ConstAcceptInterface;
template <typename H_>
- class MutableAcceptInterface;
+ class AcceptInterface;
template <typename H_, typename T_>
class ConstAcceptInterfaceVisitsThis;
template <typename H_, typename T_>
- class MutableAcceptInterfaceVisitsThis;
+ class AcceptInterfaceVisitsThis;
template <typename H_, typename I_>
class TreeLeaf;
@@ -105,16 +105,16 @@ namespace paludis
class ConstProxyIterator;
template <typename H_, typename LargerH_>
- class MutableProxyVisitor;
+ class ProxyVisitor;
template <typename H_, typename LargerH_>
- class MutableProxyIterator;
+ class ProxyIterator;
template <typename H_>
class ConstVisitor;
template <typename H_>
- class MutableVisitor;
+ class Visitor;
template <
typename Heirarchy_,
@@ -150,13 +150,13 @@ namespace paludis
using visitor_internals::ConstTreeSequence;
using visitor_internals::TreeLeaf;
using visitor_internals::VisitorTypes;
- using visitor_internals::MutableVisitor;
+ using visitor_internals::Visitor;
using visitor_internals::ConstVisitor;
using visitor_internals::Visits;
using visitor_internals::ConstAcceptInterface;
- using visitor_internals::MutableAcceptInterface;
+ using visitor_internals::AcceptInterface;
using visitor_internals::ConstAcceptInterfaceVisitsThis;
- using visitor_internals::MutableAcceptInterfaceVisitsThis;
+ using visitor_internals::AcceptInterfaceVisitsThis;
using visitor_internals::get_const_item;
template <typename Visitor_>
diff --git a/paludis/util/visitor-impl.hh b/paludis/util/visitor-impl.hh
index 86b0fe7..7f4cf26 100644
--- a/paludis/util/visitor-impl.hh
+++ b/paludis/util/visitor-impl.hh
@@ -61,7 +61,7 @@ namespace paludis
template <typename H_>
template <bool b_, typename T_>
void
- MutableAcceptInterface<H_>::Accept<b_, T_>::forward(MutableAcceptInterface * const h, T_ & t)
+ AcceptInterface<H_>::ConstAccept<b_, T_>::forward(AcceptInterface * const h, T_ & t)
{
h->mutable_accept(t);
}
@@ -69,7 +69,7 @@ namespace paludis
template <typename H_>
template <typename T_>
void
- MutableAcceptInterface<H_>::Accept<true, T_>::forward(MutableAcceptInterface * const h, T_ & t)
+ AcceptInterface<H_>::ConstAccept<true, T_>::forward(AcceptInterface * const h, T_ & t)
{
h->const_accept(t);
}
@@ -77,7 +77,7 @@ namespace paludis
template <typename H_>
template <bool b_, typename T_>
void
- MutableAcceptInterface<H_>::MutableAccept<b_, T_>::forward(MutableAcceptInterface * const h, T_ & t)
+ AcceptInterface<H_>::Accept<b_, T_>::forward(AcceptInterface * const h, T_ & t)
{
h->real_mutable_accept(t);
}
@@ -85,34 +85,34 @@ namespace paludis
template <typename H_>
template <typename T_>
void
- MutableAcceptInterface<H_>::MutableAccept<false, T_>::forward(MutableAcceptInterface * const h, T_ & t)
+ AcceptInterface<H_>::Accept<false, T_>::forward(AcceptInterface * const h, T_ & t)
{
- MutableProxyVisitor<typename H_::Heirarchy, typename T_::Heirarchy> p(&t);
+ ProxyVisitor<typename H_::Heirarchy, typename T_::Heirarchy> p(&t);
h->accept(p);
}
template <typename H_>
- MutableAcceptInterface<H_>::~MutableAcceptInterface()
+ AcceptInterface<H_>::~AcceptInterface()
{
}
template <typename H_, typename T_>
void
- MutableAcceptInterfaceVisitsThis<H_, T_>::real_const_accept(ConstVisitor<H_> & v) const
+ AcceptInterfaceVisitsThis<H_, T_>::real_const_accept(ConstVisitor<H_> & v) const
{
static_cast<Visits<const T_> *>(&v)->visit(*static_cast<const T_ *>(this));
}
template <typename H_, typename T_>
void
- MutableAcceptInterfaceVisitsThis<H_, T_>::real_mutable_accept(MutableVisitor<H_> & v)
+ AcceptInterfaceVisitsThis<H_, T_>::real_mutable_accept(Visitor<H_> & v)
{
static_cast<Visits<T_> *>(&v)->visit(*static_cast<T_ *>(this));
}
template <typename H_, typename T_>
void
- TreeLeaf<H_, T_>::real_mutable_accept(MutableVisitor<H_> & v)
+ TreeLeaf<H_, T_>::real_mutable_accept(Visitor<H_> & v)
{
static_cast<Visits<TreeLeaf<H_, T_> > *>(&v)->visit(*this);
}
@@ -151,7 +151,7 @@ namespace paludis
template <typename H_, typename T_>
void
- TreeSequence<H_, T_>::real_mutable_accept(MutableVisitor<H_> & v)
+ TreeSequence<H_, T_>::real_mutable_accept(Visitor<H_> & v)
{
static_cast<Visits<TreeSequence<H_, T_> > *>(&v)->visit(*this);
}
@@ -171,7 +171,7 @@ namespace paludis
template <typename H_, typename T_>
TreeSequence<H_, T_>::TreeSequence(tr1::shared_ptr<T_> i) :
_item(i),
- _items(new Sequence<tr1::shared_ptr<MutableAcceptInterface<H_> > >)
+ _items(new Sequence<tr1::shared_ptr<AcceptInterface<H_> > >)
{
}
@@ -191,7 +191,7 @@ namespace paludis
template <typename H_, typename T_>
void
- TreeSequence<H_, T_>::add(tr1::shared_ptr<MutableAcceptInterface<H_> > i)
+ TreeSequence<H_, T_>::add(tr1::shared_ptr<AcceptInterface<H_> > i)
{
_items->push_back(i);
}
@@ -213,18 +213,18 @@ namespace paludis
}
template <typename H_, typename T_>
- typename H_::MutableSequenceIterator
+ typename H_::SequenceIterator
TreeSequence<H_, T_>::mutable_begin()
{
- return typename H_::MutableSequenceIterator(
+ return typename H_::SequenceIterator(
paludis::indirect_iterator(_items->begin()));
}
template <typename H_, typename T_>
- typename H_::MutableSequenceIterator
+ typename H_::SequenceIterator
TreeSequence<H_, T_>::mutable_end()
{
- return typename H_::MutableSequenceIterator(
+ return typename H_::SequenceIterator(
paludis::indirect_iterator(_items->end()));
}
@@ -384,7 +384,7 @@ namespace paludis
ProxyVisits<H_, LargerH_, TreeLeaf<H_, T_> >::visit_leaf(T_ & v)
{
static_cast<Visits<TreeLeaf<LargerH_, T_> > *>(
- static_cast<MutableProxyVisitor<H_, LargerH_> *>(this)->larger_visitor())->visit_leaf(v);
+ static_cast<ProxyVisitor<H_, LargerH_> *>(this)->larger_visitor())->visit_leaf(v);
}
template <typename H_, typename LargerH_, typename T_>
@@ -429,13 +429,13 @@ namespace paludis
template <typename H_, typename LargerH_, typename T_>
void
ProxyVisits<H_, LargerH_, TreeSequence<H_, T_> >::visit_sequence(T_ & t,
- typename TreeSequenceIteratorTypes<H_>::MutableIterator c,
- typename TreeSequenceIteratorTypes<H_>::MutableIterator e)
+ typename TreeSequenceIteratorTypes<H_>::Iterator c,
+ typename TreeSequenceIteratorTypes<H_>::Iterator e)
{
static_cast<Visits<TreeSequence<LargerH_, T_> > *>(
- static_cast<MutableProxyVisitor<H_, LargerH_> *>(this)->larger_visitor())->visit_sequence(t,
- typename TreeSequenceIteratorTypes<LargerH_>::MutableIterator(MutableProxyIterator<H_, LargerH_>(c)),
- typename TreeSequenceIteratorTypes<LargerH_>::MutableIterator(MutableProxyIterator<H_, LargerH_>(e)));
+ static_cast<ProxyVisitor<H_, LargerH_> *>(this)->larger_visitor())->visit_sequence(t,
+ typename TreeSequenceIteratorTypes<LargerH_>::Iterator(ProxyIterator<H_, LargerH_>(c)),
+ typename TreeSequenceIteratorTypes<LargerH_>::Iterator(ProxyIterator<H_, LargerH_>(e)));
}
template <typename H_, typename LargerH_>
@@ -452,14 +452,14 @@ namespace paludis
}
template <typename H_, typename LargerH_>
- MutableProxyVisitor<H_, LargerH_>::MutableProxyVisitor(MutableVisitor<LargerH_> * const l) :
+ ProxyVisitor<H_, LargerH_>::ProxyVisitor(Visitor<LargerH_> * const l) :
_larger_h(l)
{
}
template <typename H_, typename LargerH_>
- MutableVisitor<LargerH_> *
- MutableProxyVisitor<H_, LargerH_>::larger_visitor() const
+ Visitor<LargerH_> *
+ ProxyVisitor<H_, LargerH_>::larger_visitor() const
{
return _larger_h;
}
@@ -516,41 +516,41 @@ namespace paludis
}
template <typename H_, typename LargerH_>
- MutableProxyIterator<H_, LargerH_>::Adapter::Adapter(MutableAcceptInterface<H_> & i) :
+ ProxyIterator<H_, LargerH_>::Adapter::Adapter(AcceptInterface<H_> & i) :
_i(i)
{
}
template <typename H_, typename LargerH_>
void
- MutableProxyIterator<H_, LargerH_>::Adapter::real_const_accept(ConstVisitor<LargerH_> & v) const
+ ProxyIterator<H_, LargerH_>::Adapter::real_const_accept(ConstVisitor<LargerH_> & v) const
{
_i.accept(v);
}
template <typename H_, typename LargerH_>
void
- MutableProxyIterator<H_, LargerH_>::Adapter::real_mutable_accept(MutableVisitor<LargerH_> & v)
+ ProxyIterator<H_, LargerH_>::Adapter::real_mutable_accept(Visitor<LargerH_> & v)
{
_i.accept(v);
}
template <typename H_, typename LargerH_>
- MutableProxyIterator<H_, LargerH_>::MutableProxyIterator(typename TreeSequenceIteratorTypes<H_>::MutableIterator i) :
+ ProxyIterator<H_, LargerH_>::ProxyIterator(typename TreeSequenceIteratorTypes<H_>::Iterator i) :
_i(i)
{
}
template <typename H_, typename LargerH_>
bool
- MutableProxyIterator<H_, LargerH_>::operator== (const MutableProxyIterator & other) const
+ ProxyIterator<H_, LargerH_>::operator== (const ProxyIterator & other) const
{
return _i == other._i;
}
template <typename H_, typename LargerH_>
- MutableAcceptInterface<LargerH_> *
- MutableProxyIterator<H_, LargerH_>::operator-> () const
+ AcceptInterface<LargerH_> *
+ ProxyIterator<H_, LargerH_>::operator-> () const
{
if (! _c)
_c.reset(new Adapter(*_i));
@@ -558,15 +558,15 @@ namespace paludis
}
template <typename H_, typename LargerH_>
- MutableAcceptInterface<LargerH_> &
- MutableProxyIterator<H_, LargerH_>::operator* () const
+ AcceptInterface<LargerH_> &
+ ProxyIterator<H_, LargerH_>::operator* () const
{
return *operator-> ();
}
template <typename H_, typename LargerH_>
- MutableProxyIterator<H_, LargerH_> &
- MutableProxyIterator<H_, LargerH_>::operator++ ()
+ ProxyIterator<H_, LargerH_> &
+ ProxyIterator<H_, LargerH_>::operator++ ()
{
_c.reset();
_i++;
@@ -596,9 +596,9 @@ namespace paludis
template <typename H_>
template <typename A_, typename B_>
void
- MutableVisitor<H_>::VisitSequence<A_, B_>::visit_sequence(B_ &,
- typename TreeSequenceIteratorTypes<Heirarchy>::MutableIterator c,
- typename TreeSequenceIteratorTypes<Heirarchy>::MutableIterator e)
+ Visitor<H_>::VisitSequence<A_, B_>::visit_sequence(B_ &,
+ typename TreeSequenceIteratorTypes<Heirarchy>::Iterator c,
+ typename TreeSequenceIteratorTypes<Heirarchy>::Iterator e)
{
std::for_each(c, e, accept_visitor(*static_cast<A_ *>(this)));
}
diff --git a/paludis/util/visitor.hh b/paludis/util/visitor.hh
index f73f55e..3d90978 100644
--- a/paludis/util/visitor.hh
+++ b/paludis/util/visitor.hh
@@ -136,39 +136,39 @@ namespace paludis
* \nosubgrouping
*/
template <typename H_>
- class PALUDIS_VISIBLE MutableAcceptInterface :
+ class PALUDIS_VISIBLE AcceptInterface :
public ConstAcceptInterface<H_>
{
private:
template <bool b_, typename T_>
- struct PALUDIS_VISIBLE Accept
+ struct PALUDIS_VISIBLE ConstAccept
{
- static void forward(MutableAcceptInterface * const h, T_ & t);
+ static void forward(AcceptInterface * const h, T_ & t);
};
template <typename T_>
- struct PALUDIS_VISIBLE Accept<true, T_>
+ struct PALUDIS_VISIBLE ConstAccept<true, T_>
{
- static void forward(MutableAcceptInterface * const h, T_ & t);
+ static void forward(AcceptInterface * const h, T_ & t);
};
template <bool b_, typename T_>
- struct PALUDIS_VISIBLE MutableAccept
+ struct PALUDIS_VISIBLE Accept
{
- static void forward(MutableAcceptInterface * const h, T_ & t);
+ static void forward(AcceptInterface * const h, T_ & t);
};
template <typename T_>
- struct PALUDIS_VISIBLE MutableAccept<false, T_>
+ struct PALUDIS_VISIBLE Accept<false, T_>
{
- static void forward(MutableAcceptInterface * const h, T_ & t);
+ static void forward(AcceptInterface * const h, T_ & t);
};
protected:
///\name Visitor operations
///\{
- virtual void real_mutable_accept(MutableVisitor<H_> &) = 0;
+ virtual void real_mutable_accept(Visitor<H_> &) = 0;
///\}
@@ -176,7 +176,7 @@ namespace paludis
///\name Basic operations
///\{
- virtual ~MutableAcceptInterface();
+ virtual ~AcceptInterface();
///\}
@@ -186,7 +186,7 @@ namespace paludis
template <typename V_>
void mutable_accept(V_ & v)
{
- MutableAccept<tr1::is_same<typename H_::Heirarchy, typename V_::Heirarchy>::value, V_>::forward(this, v);
+ Accept<tr1::is_same<typename H_::Heirarchy, typename V_::Heirarchy>::value, V_>::forward(this, v);
}
template <typename V_>
@@ -198,7 +198,7 @@ namespace paludis
template <typename V_>
void accept(V_ & v)
{
- Accept<V_::visitor_is_const, V_>::forward(this, v);
+ ConstAccept<V_::visitor_is_const, V_>::forward(this, v);
}
///\}
@@ -211,8 +211,8 @@ namespace paludis
* \nosubgrouping
*/
template <typename H_, typename T_>
- class PALUDIS_VISIBLE MutableAcceptInterfaceVisitsThis :
- public virtual MutableAcceptInterface<H_>
+ class PALUDIS_VISIBLE AcceptInterfaceVisitsThis :
+ public virtual AcceptInterface<H_>
{
protected:
///\name Visitor operations
@@ -220,7 +220,7 @@ namespace paludis
virtual void real_const_accept(ConstVisitor<H_> & v) const;
- virtual void real_mutable_accept(MutableVisitor<H_> & v);
+ virtual void real_mutable_accept(Visitor<H_> & v);
///\}
};
@@ -233,7 +233,7 @@ namespace paludis
*/
template <typename H_, typename T_>
class PALUDIS_VISIBLE TreeLeaf :
- public MutableAcceptInterface<H_>
+ public AcceptInterface<H_>
{
private:
TreeLeaf(const TreeLeaf &);
@@ -245,7 +245,7 @@ namespace paludis
///\name Visitor operations
///\{
- virtual void real_mutable_accept(MutableVisitor<H_> & v);
+ virtual void real_mutable_accept(Visitor<H_> & v);
virtual void real_const_accept(ConstVisitor<H_> & v) const;
@@ -279,20 +279,20 @@ namespace paludis
*/
template <typename H_, typename T_>
class PALUDIS_VISIBLE TreeSequence :
- public MutableAcceptInterface<H_>
+ public AcceptInterface<H_>
{
private:
TreeSequence(const TreeSequence &);
const TreeSequence & operator= (const TreeSequence &);
const tr1::shared_ptr<T_> _item;
- const tr1::shared_ptr<Sequence<tr1::shared_ptr<MutableAcceptInterface<H_> > > > _items;
+ const tr1::shared_ptr<Sequence<tr1::shared_ptr<AcceptInterface<H_> > > > _items;
protected:
///\name Visitor operations
///\{
- virtual void real_mutable_accept(MutableVisitor<H_> & v);
+ virtual void real_mutable_accept(Visitor<H_> & v);
virtual void real_const_accept(ConstVisitor<H_> & v) const;
@@ -320,7 +320,7 @@ namespace paludis
///\name Work on our children
///\{
- void add(tr1::shared_ptr<MutableAcceptInterface<H_> > i);
+ void add(tr1::shared_ptr<AcceptInterface<H_> > i);
typename H_::ConstSequenceIterator
const_begin() const;
@@ -328,10 +328,10 @@ namespace paludis
typename H_::ConstSequenceIterator
const_end() const;
- typename H_::MutableSequenceIterator
+ typename H_::SequenceIterator
mutable_begin();
- typename H_::MutableSequenceIterator
+ typename H_::SequenceIterator
mutable_end();
///\}
@@ -522,8 +522,8 @@ namespace paludis
///\{
virtual void visit_sequence(T_ &,
- typename TreeSequenceIteratorTypes<H_>::MutableIterator,
- typename TreeSequenceIteratorTypes<H_>::MutableIterator) = 0;
+ typename TreeSequenceIteratorTypes<H_>::Iterator,
+ typename TreeSequenceIteratorTypes<H_>::Iterator) = 0;
void visit(TreeSequence<H_, T_> & s);
@@ -634,7 +634,7 @@ namespace paludis
///\{
typedef libwrapiter::ForwardIterator<TreeSequenceIteratorTypes, const ConstAcceptInterface<H_> > ConstIterator;
- typedef libwrapiter::ForwardIterator<TreeSequenceIteratorTypes, MutableAcceptInterface<H_> > MutableIterator;
+ typedef libwrapiter::ForwardIterator<TreeSequenceIteratorTypes, AcceptInterface<H_> > Iterator;
///\}
};
@@ -803,8 +803,8 @@ namespace paludis
///\{
virtual void visit_sequence(T_ & t,
- typename TreeSequenceIteratorTypes<H_>::MutableIterator c,
- typename TreeSequenceIteratorTypes<H_>::MutableIterator e);
+ typename TreeSequenceIteratorTypes<H_>::Iterator c,
+ typename TreeSequenceIteratorTypes<H_>::Iterator e);
///\}
};
@@ -865,8 +865,8 @@ namespace paludis
* \nosubgrouping
*/
template <typename H_, typename LargerH_>
- class PALUDIS_VISIBLE MutableProxyVisitor :
- public MutableVisitor<H_>,
+ class PALUDIS_VISIBLE ProxyVisitor :
+ public Visitor<H_>,
public ProxyVisits<H_, LargerH_, typename H_::ContainedItem1>,
public ProxyVisits<H_, LargerH_, typename H_::ContainedItem2>,
public ProxyVisits<H_, LargerH_, typename H_::ContainedItem3>,
@@ -889,20 +889,20 @@ namespace paludis
public ProxyVisits<H_, LargerH_, typename H_::ContainedItem20>
{
private:
- MutableVisitor<LargerH_> * const _larger_h;
+ Visitor<LargerH_> * const _larger_h;
public:
///\name Basic operations
///\{
- MutableProxyVisitor(MutableVisitor<LargerH_> * const l);
+ ProxyVisitor(Visitor<LargerH_> * const l);
///\}
///\name Visitor operations
///\{
- MutableVisitor<LargerH_> * larger_visitor() const;
+ Visitor<LargerH_> * larger_visitor() const;
///\}
};
@@ -955,38 +955,38 @@ namespace paludis
* \nosubgrouping
*/
template <typename H_, typename LargerH_>
- class PALUDIS_VISIBLE MutableProxyIterator :
+ class PALUDIS_VISIBLE ProxyIterator :
public paludis::equality_operators::HasEqualityOperators
{
private:
struct PALUDIS_VISIBLE Adapter :
- MutableAcceptInterface<LargerH_>
+ AcceptInterface<LargerH_>
{
- MutableAcceptInterface<H_> & _i;
+ AcceptInterface<H_> & _i;
- Adapter(MutableAcceptInterface<H_> & i);
+ Adapter(AcceptInterface<H_> & i);
void real_const_accept(ConstVisitor<LargerH_> & v) const;
- void real_mutable_accept(MutableVisitor<LargerH_> & v);
+ void real_mutable_accept(Visitor<LargerH_> & v);
};
- typename TreeSequenceIteratorTypes<H_>::MutableIterator _i;
+ typename TreeSequenceIteratorTypes<H_>::Iterator _i;
mutable tr1::shared_ptr<Adapter> _c;
public:
///\name Basic operations
///\{
- MutableProxyIterator(typename TreeSequenceIteratorTypes<H_>::MutableIterator i);
+ ProxyIterator(typename TreeSequenceIteratorTypes<H_>::Iterator i);
- bool operator== (const MutableProxyIterator & other) const;
+ bool operator== (const ProxyIterator & other) const;
- MutableAcceptInterface<LargerH_> * operator-> () const;
+ AcceptInterface<LargerH_> * operator-> () const;
- MutableAcceptInterface<LargerH_> & operator* () const;
+ AcceptInterface<LargerH_> & operator* () const;
- MutableProxyIterator & operator++ ();
+ ProxyIterator & operator++ ();
///\}
};
@@ -1050,10 +1050,10 @@ namespace paludis
typedef ContainedItem19_ ContainedItem19;
typedef ContainedItem20_ ContainedItem20;
- typedef MutableAcceptInterface<Heirarchy_> Item;
+ typedef AcceptInterface<Heirarchy_> Item;
typedef const ConstAcceptInterface<Heirarchy_> ConstItem;
- typedef typename TreeSequenceIteratorTypes<Heirarchy_>::MutableIterator MutableSequenceIterator;
+ typedef typename TreeSequenceIteratorTypes<Heirarchy_>::Iterator SequenceIterator;
typedef typename TreeSequenceIteratorTypes<Heirarchy_>::ConstIterator ConstSequenceIterator;
///\}
@@ -1148,7 +1148,7 @@ namespace paludis
* \ingroup grpvisitor
*/
template <typename H_>
- class MutableVisitor :
+ class Visitor :
public virtual Visits<typename H_::ContainedItem1>,
public virtual Visits<typename H_::ContainedItem2>,
public virtual Visits<typename H_::ContainedItem3>,
@@ -1193,8 +1193,8 @@ namespace paludis
///\{
virtual void visit_sequence(B_ &,
- typename TreeSequenceIteratorTypes<Heirarchy>::MutableIterator c,
- typename TreeSequenceIteratorTypes<Heirarchy>::MutableIterator e);
+ typename TreeSequenceIteratorTypes<Heirarchy>::Iterator c,
+ typename TreeSequenceIteratorTypes<Heirarchy>::Iterator e);
///\}
};
diff --git a/paludis/util/visitor_TEST.cc b/paludis/util/visitor_TEST.cc
index 5702b77..69f1edb 100644
--- a/paludis/util/visitor_TEST.cc
+++ b/paludis/util/visitor_TEST.cc
@@ -98,7 +98,7 @@ namespace
};
struct NodeVisitor :
- MutableVisitor<NodeVisitorTypes>
+ Visitor<NodeVisitorTypes>
{
std::string r;
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index 2fec22a..2172f60 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -143,16 +143,16 @@ PythonCompositeDepSpec::add_child(const tr1::shared_ptr<const PythonDepSpec> c)
_imp->children.push_back(c);
}
-PythonCompositeDepSpec::Iterator
+PythonCompositeDepSpec::ConstIterator
PythonCompositeDepSpec::begin() const
{
- return Iterator(_imp->children.begin());
+ return ConstIterator(_imp->children.begin());
}
-PythonCompositeDepSpec::Iterator
+PythonCompositeDepSpec::ConstIterator
PythonCompositeDepSpec::end() const
{
- return Iterator(_imp->children.end());
+ return ConstIterator(_imp->children.end());
}
PythonAnyDepSpec::PythonAnyDepSpec()
@@ -890,8 +890,8 @@ SpecTreeFromPython<H_>::real_visit(const PythonAllDepSpec & d)
Save<tr1::function<void (tr1::shared_ptr<ConstAcceptInterface<H_> >)> > old_add(&_add,
tr1::bind(&ConstTreeSequence<H_, AllDepSpec>::add, cds, tr1::placeholders::_1));
- std::for_each(IndirectIterator<PythonCompositeDepSpec::Iterator, const PythonDepSpec>(d.begin()),
- IndirectIterator<PythonCompositeDepSpec::Iterator, const PythonDepSpec>(d.end()),
+ std::for_each(IndirectIterator<PythonCompositeDepSpec::ConstIterator, const PythonDepSpec>(d.begin()),
+ IndirectIterator<PythonCompositeDepSpec::ConstIterator, const PythonDepSpec>(d.end()),
accept_visitor(*this));
}
@@ -906,8 +906,8 @@ SpecTreeFromPython<H_>::real_visit(const PythonAnyDepSpec & d)
Save<tr1::function<void (tr1::shared_ptr<ConstAcceptInterface<H_> >)> > old_add(&_add,
tr1::bind(&ConstTreeSequence<H_, AnyDepSpec>::add, cds, tr1::placeholders::_1));
- std::for_each(IndirectIterator<PythonCompositeDepSpec::Iterator, const PythonDepSpec>(d.begin()),
- IndirectIterator<PythonCompositeDepSpec::Iterator, const PythonDepSpec>(d.end()),
+ std::for_each(IndirectIterator<PythonCompositeDepSpec::ConstIterator, const PythonDepSpec>(d.begin()),
+ IndirectIterator<PythonCompositeDepSpec::ConstIterator, const PythonDepSpec>(d.end()),
accept_visitor(*this));
}
@@ -923,8 +923,8 @@ SpecTreeFromPython<H_>::real_visit(const PythonUseDepSpec & d)
Save<tr1::function<void (tr1::shared_ptr<ConstAcceptInterface<H_> >)> > old_add(&_add,
tr1::bind(&ConstTreeSequence<H_, UseDepSpec>::add, cds, tr1::placeholders::_1));
- std::for_each(IndirectIterator<PythonCompositeDepSpec::Iterator, const PythonDepSpec>(d.begin()),
- IndirectIterator<PythonCompositeDepSpec::Iterator, const PythonDepSpec>(d.end()),
+ std::for_each(IndirectIterator<PythonCompositeDepSpec::ConstIterator, const PythonDepSpec>(d.begin()),
+ IndirectIterator<PythonCompositeDepSpec::ConstIterator, const PythonDepSpec>(d.end()),
accept_visitor(*this));
}
diff --git a/python/dep_spec.hh b/python/dep_spec.hh
index 2e1cce1..b7ce90a 100644
--- a/python/dep_spec.hh
+++ b/python/dep_spec.hh
@@ -87,11 +87,11 @@ namespace paludis
void add_child(const tr1::shared_ptr<const PythonDepSpec>);
typedef libwrapiter::ForwardIterator<PythonCompositeDepSpec,
- const tr1::shared_ptr<const PythonDepSpec> > Iterator;
+ const tr1::shared_ptr<const PythonDepSpec> > ConstIterator;
- Iterator begin() const
+ ConstIterator begin() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- Iterator end() const
+ ConstIterator end() const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/python/package_id.cc b/python/package_id.cc
index 12a71a7..0bd0cdf 100644
--- a/python/package_id.cc
+++ b/python/package_id.cc
@@ -38,7 +38,7 @@ struct PackageIDWrapper
static PyObject *
find_metadata(const PackageID & self, const std::string & key)
{
- PackageID::MetadataIterator i(self.find_metadata(key));
+ PackageID::MetadataConstIterator i(self.find_metadata(key));
if (i != self.end_metadata())
return bp::incref(bp::object(*i).ptr());
else
diff --git a/python/repository.cc b/python/repository.cc
index e9d48fe..2cce44f 100644
--- a/python/repository.cc
+++ b/python/repository.cc
@@ -154,7 +154,7 @@ struct RepositoryEInterfaceWrapper
static bp::object
my_find_profile(const RepositoryEInterface & self, const FSEntry & location)
{
- RepositoryEInterface::ProfilesIterator p(self.find_profile(location));
+ RepositoryEInterface::ProfilesConstIterator p(self.find_profile(location));
if (p == self.end_profiles())
return bp::object();
return bp::object(bp::ptr(&*p));
diff --git a/ruby/contents.cc b/ruby/contents.cc
index f17d8e6..fda0d2c 100644
--- a/ruby/contents.cc
+++ b/ruby/contents.cc
@@ -171,7 +171,7 @@ namespace
tr1::shared_ptr<Contents> * ptr;
Data_Get_Struct(self, tr1::shared_ptr<Contents>, ptr);
- for (Contents::Iterator i ((*ptr)->begin()), i_end((*ptr)->end()) ; i != i_end; ++i)
+ for (Contents::ConstIterator i ((*ptr)->begin()), i_end((*ptr)->end()) ; i != i_end; ++i)
rb_yield(contents_entry_to_value(*i));
return self;
}
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 93f4a27..7431a6c 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -183,7 +183,7 @@ namespace
{
tr1::shared_ptr<CompositeDepSpec> * m_ptr;
Data_Get_Struct(self, tr1::shared_ptr<CompositeDepSpec>, m_ptr);
- for (CompositeDepSpec::Iterator i((*m_ptr)->begin()), i_end((*m_ptr)->end()) ; i != i_end ; ++i)
+ for (CompositeDepSpec::ConstIterator i((*m_ptr)->begin()), i_end((*m_ptr)->end()) ; i != i_end ; ++i)
rb_yield(dep_spec_to_value(*i));
return self;
}
@@ -265,7 +265,7 @@ namespace
VALUE result(rb_ary_new());
VALUE result_hash;
if ((*ptr)->version_requirements_ptr())
- for (VersionRequirements::Iterator i((*ptr)->version_requirements_ptr()->begin()),
+ for (VersionRequirements::ConstIterator i((*ptr)->version_requirements_ptr()->begin()),
i_end((*ptr)->version_requirements_ptr()->end()) ; i != i_end; ++i)
{
result_hash = rb_hash_new();
diff --git a/ruby/environment.cc b/ruby/environment.cc
index 20a6c7b..dd04bce 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -188,7 +188,7 @@ namespace
{
tr1::shared_ptr<const DestinationsSet> dc (value_to_environment(self)->default_destinations());
VALUE result(rb_ary_new());
- for (DestinationsSet::Iterator i(dc->begin()), i_end(dc->end()) ; i != i_end ; ++i)
+ for (DestinationsSet::ConstIterator i(dc->begin()), i_end(dc->end()) ; i != i_end ; ++i)
rb_ary_push(result, repository_to_value(*i));
return result;
diff --git a/ruby/find_unused_packages_task.cc b/ruby/find_unused_packages_task.cc
index e19d7ba..4fe85ce 100644
--- a/ruby/find_unused_packages_task.cc
+++ b/ruby/find_unused_packages_task.cc
@@ -73,7 +73,7 @@ namespace
Data_Get_Struct(self, FindUnusedPackagesTask, ptr);
tr1::shared_ptr<const PackageIDSequence> c(ptr->execute(value_to_qualified_package_name(qpn)));
VALUE result(rb_ary_new());
- for (PackageIDSequence::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (PackageIDSequence::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, package_id_to_value(*i));
return result;
}
diff --git a/ruby/package_database.cc b/ruby/package_database.cc
index 82f65be..81bb32d 100644
--- a/ruby/package_database.cc
+++ b/ruby/package_database.cc
@@ -111,7 +111,7 @@ namespace
exception_to_ruby_exception(e);
}
VALUE result(rb_ary_new());
- for (PackageIDSequence::Iterator i(items->begin()),
+ for (PackageIDSequence::ConstIterator i(items->begin()),
i_end(items->end()) ; i != i_end ; ++i)
rb_ary_push(result, package_id_to_value(*i));
return result;
@@ -135,13 +135,13 @@ namespace
if (rb_block_given_p())
{
- for (PackageDatabase::RepositoryIterator r((*self_ptr)->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r((*self_ptr)->begin_repositories()),
r_end((*self_ptr)->end_repositories()) ; r != r_end ; ++r)
rb_yield(repository_to_value(*r));
return Qnil;
}
VALUE result(rb_ary_new());
- for (PackageDatabase::RepositoryIterator r((*self_ptr)->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r((*self_ptr)->begin_repositories()),
r_end((*self_ptr)->end_repositories()) ; r != r_end ; ++r)
rb_ary_push(result, repository_to_value(*r));
diff --git a/ruby/package_id.cc b/ruby/package_id.cc
index 6dcfae8..e890d06 100644
--- a/ruby/package_id.cc
+++ b/ruby/package_id.cc
@@ -271,7 +271,7 @@ namespace
{
tr1::shared_ptr<const PackageID> * self_ptr;
Data_Get_Struct(self, tr1::shared_ptr<const PackageID>, self_ptr);
- PackageID::MetadataIterator it((*self_ptr)->find_metadata(StringValuePtr(raw_name)));
+ PackageID::MetadataConstIterator it((*self_ptr)->find_metadata(StringValuePtr(raw_name)));
if ((*self_ptr)->end_metadata() == it)
return Qnil;
return metadata_key_to_value(*it);
@@ -288,7 +288,7 @@ namespace
{
tr1::shared_ptr<const PackageID> * self_ptr;
Data_Get_Struct(self, tr1::shared_ptr<const PackageID>, self_ptr);
- for (PackageID::MetadataIterator it((*self_ptr)->begin_metadata()),
+ for (PackageID::MetadataConstIterator it((*self_ptr)->begin_metadata()),
it_end((*self_ptr)->end_metadata()); it_end != it; ++it)
{
VALUE val(metadata_key_to_value(*it));
@@ -472,7 +472,7 @@ namespace
Data_Get_Struct(self, tr1::shared_ptr<const MetadataSetKey<T_> >, self_ptr);
tr1::shared_ptr<const T_> c = (*self_ptr)->value();
VALUE result (rb_ary_new());
- for (typename T_::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (typename T_::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, rb_str_new2(stringify(*i).c_str()));
return result;
}
@@ -488,7 +488,7 @@ namespace
Data_Get_Struct(self, tr1::shared_ptr<const MetadataSetKey<PackageIDSequence> >, self_ptr);
tr1::shared_ptr<const PackageIDSequence> c = (*self_ptr)->value();
VALUE result (rb_ary_new());
- for (PackageIDSequence::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (PackageIDSequence::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, package_id_to_value(*i));
return result;
}
@@ -508,7 +508,7 @@ namespace
tr1::shared_ptr<const RepositoryMaskInfo> * ptr;
Data_Get_Struct(self, tr1::shared_ptr<const RepositoryMaskInfo>, ptr);
VALUE result(rb_ary_new());
- for (Sequence<std::string>::Iterator it((*ptr)->comment->begin()),
+ for (Sequence<std::string>::ConstIterator it((*ptr)->comment->begin()),
it_end((*ptr)->comment->end()); it_end != it; ++it)
rb_ary_push(result, rb_str_new2(it->c_str()));
return result;
diff --git a/ruby/repository.cc b/ruby/repository.cc
index 997a43e..8d3beff 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -173,13 +173,13 @@ namespace
if (rb_block_given_p())
{
tr1::shared_ptr<const CategoryNamePartSet> c((*self_ptr)->category_names());
- for (CategoryNamePartSet::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (CategoryNamePartSet::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_yield(rb_str_new2(stringify(*i).c_str()));
return Qnil;
}
VALUE result(rb_ary_new());
tr1::shared_ptr<const CategoryNamePartSet> c((*self_ptr)->category_names());
- for (CategoryNamePartSet::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (CategoryNamePartSet::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, rb_str_new2(stringify(*i).c_str()));
return result;
}
@@ -209,13 +209,13 @@ namespace
if (rb_block_given_p())
{
tr1::shared_ptr<const CategoryNamePartSet> c((*self_ptr)->category_names_containing_package(package));
- for (CategoryNamePartSet::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (CategoryNamePartSet::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_yield(rb_str_new2(stringify(*i).c_str()));
return Qnil;
}
VALUE result(rb_ary_new());
tr1::shared_ptr<const CategoryNamePartSet> c((*self_ptr)->category_names_containing_package(package));
- for (CategoryNamePartSet::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (CategoryNamePartSet::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, rb_str_new2(stringify(*i).c_str()));
return result;
}
@@ -245,13 +245,13 @@ namespace
if (rb_block_given_p())
{
tr1::shared_ptr<const QualifiedPackageNameSet> c((*self_ptr)->package_names(category));
- for (QualifiedPackageNameSet::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (QualifiedPackageNameSet::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_yield(qualified_package_name_to_value(*i));
return Qnil;
}
VALUE result(rb_ary_new());
tr1::shared_ptr<const QualifiedPackageNameSet> c((*self_ptr)->package_names(category));
- for (QualifiedPackageNameSet::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (QualifiedPackageNameSet::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, qualified_package_name_to_value(*i));
return result;
}
@@ -282,13 +282,13 @@ namespace
if (rb_block_given_p())
{
tr1::shared_ptr<const PackageIDSequence> c((*self_ptr)->package_ids(q));
- for (PackageIDSequence::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (PackageIDSequence::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_yield(package_id_to_value(*i));
return Qnil;
}
VALUE result(rb_ary_new());
tr1::shared_ptr<const PackageIDSequence> c((*self_ptr)->package_ids(q));
- for (PackageIDSequence::Iterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
+ for (PackageIDSequence::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, package_id_to_value(*i));
return result;
}
@@ -452,7 +452,7 @@ namespace
Data_Get_Struct(self, tr1::shared_ptr<const RepositoryInfo>, self_ptr);
VALUE result(rb_ary_new());
- for (RepositoryInfo::SectionIterator i((*self_ptr)->begin_sections()),
+ for (RepositoryInfo::SectionConstIterator i((*self_ptr)->begin_sections()),
i_end((*self_ptr)->end_sections()) ; i != i_end ; ++i)
{
tr1::shared_ptr<const RepositoryInfoSection> * s(new tr1::shared_ptr<const RepositoryInfoSection>(*i));
@@ -481,7 +481,7 @@ namespace
Data_Get_Struct(self, tr1::shared_ptr<const RepositoryInfoSection>, self_ptr);
VALUE result(rb_hash_new());
- for (RepositoryInfoSection::KeyValueIterator i((*self_ptr)->begin_kvs()),
+ for (RepositoryInfoSection::KeyValueConstIterator i((*self_ptr)->begin_kvs()),
i_end((*self_ptr)->end_kvs()) ; i != i_end ; ++i)
rb_hash_aset(result, rb_str_new2(i->first.c_str()), rb_str_new2(i->second.c_str()));
return result;
@@ -656,7 +656,7 @@ namespace
Data_Get_Struct(self, tr1::shared_ptr<Repository>, self_ptr);
if ((*self_ptr)->e_interface) {
VALUE result(rb_ary_new());
- for (RepositoryEInterface::ProfilesIterator i((*self_ptr)->e_interface->begin_profiles()),
+ for (RepositoryEInterface::ProfilesConstIterator i((*self_ptr)->e_interface->begin_profiles()),
i_end((*self_ptr)->e_interface->end_profiles()) ; i != i_end ; ++i)
{
rb_ary_push(result, profiles_desc_line_to_value(*i));
@@ -690,7 +690,7 @@ namespace
if ((*self_ptr)->e_interface)
{
- RepositoryEInterface::ProfilesIterator p((*self_ptr)->e_interface->find_profile(FSEntry(StringValuePtr(profile))));
+ RepositoryEInterface::ProfilesConstIterator p((*self_ptr)->e_interface->find_profile(FSEntry(StringValuePtr(profile))));
if (p == (*self_ptr)->e_interface->end_profiles())
return Qnil;
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index 994d77e..262cf49 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
results(tr1::cref(comparator));
unsigned success(0), total(0);
- for (PackageIDSequence::Iterator i(ids->begin()), i_end(ids->end()) ;
+ for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;
i != i_end ; ++i)
{
Context i_context("When fetching ID '" + stringify(**i) + "':");
@@ -157,7 +157,7 @@ main(int argc, char *argv[])
}
catch (const FetchActionError & e)
{
- for (Sequence<FetchActionFailure>::Iterator f(e.failures()->begin()), f_end(e.failures()->end()) ; f != f_end ; ++f)
+ for (Sequence<FetchActionFailure>::ConstIterator f(e.failures()->begin()), f_end(e.failures()->end()) ; f != f_end ; ++f)
{
std::string r;
if (f->requires_manual_fetching)
diff --git a/src/clients/adjutrix/display_default_system_resolution.cc b/src/clients/adjutrix/display_default_system_resolution.cc
index 6f4a293..17b1350 100644
--- a/src/clients/adjutrix/display_default_system_resolution.cc
+++ b/src/clients/adjutrix/display_default_system_resolution.cc
@@ -78,7 +78,7 @@ namespace
{
d.add(*env.set(SetName("system")), env.default_destinations());
- for (DepList::Iterator e(d.begin()), e_end(d.end()) ; e != e_end ; ++e)
+ for (DepList::ConstIterator e(d.begin()), e_end(d.end()) ; e != e_end ; ++e)
cout << " " << *e->package_id << endl;
}
catch (const NoSuchPackageError & e)
@@ -123,7 +123,7 @@ int do_display_default_system_resolution(NoConfigEnvironment & env)
if (CommandLine::get_instance()->a_profile.begin_args() ==
CommandLine::get_instance()->a_profile.end_args())
{
- for (RepositoryEInterface::ProfilesIterator
+ for (RepositoryEInterface::ProfilesConstIterator
p(env.main_repository()->e_interface->begin_profiles()),
p_end(env.main_repository()->e_interface->end_profiles()) ; p != p_end ; ++p)
{
@@ -133,10 +133,10 @@ int do_display_default_system_resolution(NoConfigEnvironment & env)
}
else
{
- for (args::StringSetArg::Iterator i(CommandLine::get_instance()->a_profile.begin_args()),
+ for (args::StringSetArg::ConstIterator i(CommandLine::get_instance()->a_profile.begin_args()),
i_end(CommandLine::get_instance()->a_profile.end_args()) ; i != i_end ; ++i)
{
- RepositoryEInterface::ProfilesIterator
+ RepositoryEInterface::ProfilesConstIterator
p(env.main_repository()->e_interface->find_profile(
env.main_repository_dir() / "profiles" / (*i)));
if (p == env.main_repository()->e_interface->end_profiles())
diff --git a/src/clients/adjutrix/downgrade_check.cc b/src/clients/adjutrix/downgrade_check.cc
index e5d9a36..ed870c3 100644
--- a/src/clients/adjutrix/downgrade_check.cc
+++ b/src/clients/adjutrix/downgrade_check.cc
@@ -50,7 +50,7 @@ namespace
QualifiedPackageName old_package("dummy/dummy");
SlotName old_slot("dummy");
VersionSpec best_version("0");
- for (IndirectIterator<PackageIDSequence::Iterator> m(matches->begin()), m_end(matches->end()) ;
+ for (IndirectIterator<PackageIDSequence::ConstIterator> m(matches->begin()), m_end(matches->end()) ;
m != m_end ; ++m)
{
if (m->name() != old_package || m->slot() != old_slot)
@@ -69,7 +69,7 @@ namespace
}
std::string
- make_filename(const RepositoryEInterface::ProfilesIterator & p, bool unstable)
+ make_filename(const RepositoryEInterface::ProfilesConstIterator & p, bool unstable)
{
std::string result;
FSEntry f(p->path);
@@ -85,7 +85,7 @@ namespace
}
std::string
- make_desc(const RepositoryEInterface::ProfilesIterator & p, bool unstable)
+ make_desc(const RepositoryEInterface::ProfilesConstIterator & p, bool unstable)
{
std::string result;
FSEntry f(p->path);
@@ -168,7 +168,7 @@ do_build_downgrade_check_list(NoConfigEnvironment & env)
if (! output_dir.mkdir())
throw ConfigurationError("Output directory already exists");
- for (RepositoryEInterface::ProfilesIterator
+ for (RepositoryEInterface::ProfilesConstIterator
p(env.main_repository()->e_interface->begin_profiles()),
p_end(env.main_repository()->e_interface->end_profiles()) ; p != p_end ; ++p)
{
@@ -201,7 +201,7 @@ do_downgrade_check(NoConfigEnvironment & env)
std::multimap<QPNS, std::string> results;
- for (RepositoryEInterface::ProfilesIterator
+ for (RepositoryEInterface::ProfilesConstIterator
p(env.main_repository()->e_interface->begin_profiles()),
p_end(env.main_repository()->e_interface->end_profiles()) ; p != p_end ; ++p)
{
diff --git a/src/clients/adjutrix/find_dropped_keywords.cc b/src/clients/adjutrix/find_dropped_keywords.cc
index d78b79c..a51592c 100644
--- a/src/clients/adjutrix/find_dropped_keywords.cc
+++ b/src/clients/adjutrix/find_dropped_keywords.cc
@@ -120,7 +120,7 @@ namespace
VersionsInSlots versions_in_slots;
tr1::shared_ptr<const PackageIDSequence> versions(repo.package_ids(package));
- for (PackageIDSequence::Iterator v(versions->begin()), v_end(versions->end()) ;
+ for (PackageIDSequence::ConstIterator v(versions->begin()), v_end(versions->end()) ;
v != v_end ; ++v)
{
if (! (*v)->keywords_key())
@@ -171,7 +171,7 @@ void do_find_dropped_keywords(const NoConfigEnvironment & env)
KeywordName keyword(*CommandLine::get_instance()->begin_parameters());
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()),
r_end(env.package_database()->end_repositories()) ; r != r_end ; ++r)
{
@@ -183,7 +183,7 @@ void do_find_dropped_keywords(const NoConfigEnvironment & env)
write_repository_header(keyword, r->name());
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
if (CommandLine::get_instance()->a_category.specified())
@@ -194,7 +194,7 @@ void do_find_dropped_keywords(const NoConfigEnvironment & env)
continue;
tr1::shared_ptr<const QualifiedPackageNameSet> pkg_names(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
{
if (CommandLine::get_instance()->a_package.specified())
diff --git a/src/clients/adjutrix/find_insecure_packages.cc b/src/clients/adjutrix/find_insecure_packages.cc
index 8a0d0dd..c191367 100644
--- a/src/clients/adjutrix/find_insecure_packages.cc
+++ b/src/clients/adjutrix/find_insecure_packages.cc
@@ -84,7 +84,7 @@ namespace
{
tr1::shared_ptr<const PackageIDSequence> insecure(
_env.package_database()->query(query::Matches(a), qo_order_by_version));
- for (PackageIDSequence::Iterator i(insecure->begin()),
+ for (PackageIDSequence::ConstIterator i(insecure->begin()),
i_end(insecure->end()) ; i != i_end ; ++i)
if (a.tag())
_found.insert(std::make_pair(*i, a.tag()->short_text()));
@@ -124,7 +124,7 @@ void do_find_insecure_packages(const NoConfigEnvironment & env)
{
Context context("When performing find-insecure-packages action:");
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()),
r_end(env.package_database()->end_repositories()) ; r != r_end ; ++r)
{
diff --git a/src/clients/adjutrix/find_reverse_deps.cc b/src/clients/adjutrix/find_reverse_deps.cc
index c4d8dcf..3760f58 100644
--- a/src/clients/adjutrix/find_reverse_deps.cc
+++ b/src/clients/adjutrix/find_reverse_deps.cc
@@ -142,7 +142,7 @@ namespace
bool header_written = false;
- for (IndirectIterator<PackageIDSequence::Iterator> e(dep_entries->begin()), e_end(dep_entries->end()) ;
+ for (IndirectIterator<PackageIDSequence::ConstIterator> e(dep_entries->begin()), e_end(dep_entries->end()) ;
e != e_end ; ++e)
{
if (indirect_iterator(_entries.end()) != std::find(indirect_iterator(_entries.begin()),
@@ -192,7 +192,7 @@ namespace
bool found_matches(false);
- for (IndirectIterator<PackageIDSequence::Iterator> e(p_entries->begin()), e_end(p_entries->end()) ;
+ for (IndirectIterator<PackageIDSequence::ConstIterator> e(p_entries->begin()), e_end(p_entries->end()) ;
e != e_end ; ++e)
{
try
@@ -249,7 +249,7 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
cerr << "Query error:" << endl;
cerr << " * " << e.backtrace("\n * ");
cerr << "Ambiguous package name '" << e.name() << "'. Did you mean:" << endl;
- for (AmbiguousPackageNameError::OptionsIterator o(e.begin_options()),
+ for (AmbiguousPackageNameError::OptionsConstIterator o(e.begin_options()),
o_end(e.end_options()) ; o != o_end ; ++o)
cerr << " * " << colour(cl_package_name, *o) << endl;
cerr << endl;
@@ -267,7 +267,7 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
return 1;
}
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()),
r_end(env.package_database()->end_repositories()) ; r != r_end ; ++r)
{
@@ -279,7 +279,7 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
write_repository_header(stringify(*spec), stringify(r->name()));
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
cerr << xterm_title("Checking " + stringify(*c) + " - adjutrix");
@@ -292,7 +292,7 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
continue;
tr1::shared_ptr<const QualifiedPackageNameSet> pkg_names(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
{
if (CommandLine::get_instance()->a_package.specified())
diff --git a/src/clients/adjutrix/find_stable_candidates.cc b/src/clients/adjutrix/find_stable_candidates.cc
index 024ce30..61f675f 100644
--- a/src/clients/adjutrix/find_stable_candidates.cc
+++ b/src/clients/adjutrix/find_stable_candidates.cc
@@ -119,7 +119,7 @@ namespace
SlotsToVersions slots_to_versions;
tr1::shared_ptr<const PackageIDSequence> versions(repo.package_ids(package));
- for (PackageIDSequence::Iterator v(versions->begin()), v_end(versions->end()) ;
+ for (PackageIDSequence::ConstIterator v(versions->begin()), v_end(versions->end()) ;
v != v_end ; ++v)
{
if (! (*v)->keywords_key())
@@ -174,7 +174,7 @@ void do_find_stable_candidates(const NoConfigEnvironment & env)
KeywordName keyword(*CommandLine::get_instance()->begin_parameters());
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()),
r_end(env.package_database()->end_repositories()) ; r != r_end ; ++r)
{
@@ -186,7 +186,7 @@ void do_find_stable_candidates(const NoConfigEnvironment & env)
write_repository_header(keyword, r->name());
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
if (CommandLine::get_instance()->a_category.specified())
@@ -197,7 +197,7 @@ void do_find_stable_candidates(const NoConfigEnvironment & env)
continue;
tr1::shared_ptr<const QualifiedPackageNameSet> pkg_names(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
{
if (CommandLine::get_instance()->a_package.specified())
diff --git a/src/clients/adjutrix/find_unused_packages.cc b/src/clients/adjutrix/find_unused_packages.cc
index ce98a0a..8000eeb 100644
--- a/src/clients/adjutrix/find_unused_packages.cc
+++ b/src/clients/adjutrix/find_unused_packages.cc
@@ -42,7 +42,7 @@ void do_find_unused_packages(const NoConfigEnvironment & env)
{
Context context("When performing find-unused-packages action:");
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()),
r_end(env.package_database()->end_repositories()) ; r != r_end ; ++r)
{
@@ -60,7 +60,7 @@ void do_find_unused_packages(const NoConfigEnvironment & env)
cout << "Searching for unused packages in repository " << stringify(r->name()) << endl;
tr1::shared_ptr<const CategoryNamePartSet> categories(r->category_names());
- for (CategoryNamePartSet::Iterator c(categories->begin()), c_end(categories->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(categories->begin()), c_end(categories->end()) ;
c != c_end ; ++c)
{
Context cat_context("When searching for unused packages in category '" + stringify(*c) + "':");
@@ -75,7 +75,7 @@ void do_find_unused_packages(const NoConfigEnvironment & env)
cout << " In category " << stringify(*c) << ":" << endl;
tr1::shared_ptr<const QualifiedPackageNameSet> packages(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(packages->begin()), p_end(packages->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(packages->begin()), p_end(packages->end()) ;
p != p_end ; ++p)
{
Context pkg_context("When searching for unused packages with package name '" + stringify(*p) + "':");
@@ -88,7 +88,7 @@ void do_find_unused_packages(const NoConfigEnvironment & env)
continue;
tr1::shared_ptr<const PackageIDSequence> unused(task.execute(*p));
- for (IndirectIterator<PackageIDSequence::Iterator> u(unused->begin()), u_end(unused->end()) ;
+ for (IndirectIterator<PackageIDSequence::ConstIterator> u(unused->begin()), u_end(unused->end()) ;
u != u_end ; ++u)
cout << stringify(*u) << endl;
}
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index b894ec7..7d39124 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -111,7 +111,7 @@ namespace
for (unsigned h = 0 ; h < tallest_arch_name ; ++h)
{
cout << std::left << std::setw(version_specs_columns_width) << " " << "| ";
- for (UseFlagNameSet::Iterator a(arch_flags->begin()), a_end(arch_flags->end()) ;
+ for (UseFlagNameSet::ConstIterator a(arch_flags->begin()), a_end(arch_flags->end()) ;
a != a_end ; ++a)
{
if ((tallest_arch_name - h) > a->data().length())
@@ -137,7 +137,7 @@ namespace
<< std::string(longest_slot_name + 3, '-') << endl;
SlotName old_slot("first_slot");
- for (IndirectIterator<PackageIDSequence::Iterator> p(packages->begin()), p_end(packages->end()) ;
+ for (IndirectIterator<PackageIDSequence::ConstIterator> p(packages->begin()), p_end(packages->end()) ;
p != p_end ; ++p)
{
if (! p->keywords_key())
@@ -153,7 +153,7 @@ namespace
tr1::shared_ptr<const KeywordNameSet> keywords(p->keywords_key()->value());
- for (UseFlagNameSet::Iterator a(arch_flags->begin()), a_end(arch_flags->end()) ;
+ for (UseFlagNameSet::ConstIterator a(arch_flags->begin()), a_end(arch_flags->end()) ;
a != a_end ; ++a)
{
if (keywords->end() != keywords->find(KeywordName(stringify(*a))))
@@ -188,7 +188,7 @@ void do_keywords_graph(const NoConfigEnvironment & env)
{
Context context("When performing keywords-graph action:");
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()),
r_end(env.package_database()->end_repositories()) ; r != r_end ; ++r)
{
@@ -198,7 +198,7 @@ void do_keywords_graph(const NoConfigEnvironment & env)
continue;
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
if (CommandLine::get_instance()->a_category.specified())
@@ -209,7 +209,7 @@ void do_keywords_graph(const NoConfigEnvironment & env)
continue;
tr1::shared_ptr<const QualifiedPackageNameSet> pkg_names(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
{
if (CommandLine::get_instance()->a_package.specified())
diff --git a/src/clients/adjutrix/what_needs_keywording.cc b/src/clients/adjutrix/what_needs_keywording.cc
index 219c24a..b42f49c 100644
--- a/src/clients/adjutrix/what_needs_keywording.cc
+++ b/src/clients/adjutrix/what_needs_keywording.cc
@@ -77,7 +77,7 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
DepList d(&env, d_options);
- for (CommandLine::ParametersIterator p(next(CommandLine::get_instance()->begin_parameters())),
+ for (CommandLine::ParametersConstIterator p(next(CommandLine::get_instance()->begin_parameters())),
p_end(CommandLine::get_instance()->end_parameters()) ; p != p_end ; ++p)
{
if (std::string::npos == p->find('/'))
@@ -99,7 +99,7 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
<< std::string(17, '=') << " " << std::string(9, '=') << endl;
bool none(true);
- for (DepList::Iterator p(d.begin()), p_end(d.end()) ; p != p_end ; ++p)
+ for (DepList::ConstIterator p(d.begin()), p_end(d.end()) ; p != p_end ; ++p)
if (dlk_masked == p->kind)
{
none = false;
@@ -111,7 +111,7 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
if (p->package_id->keywords_key())
{
tr1::shared_ptr<const KeywordNameSet> keywords(p->package_id->keywords_key()->value());
- for (KeywordNameSet::Iterator k(keywords->begin()), k_end(keywords->end()) ;
+ for (KeywordNameSet::ConstIterator k(keywords->begin()), k_end(keywords->end()) ;
k != k_end ; ++k)
if (*k == KeywordName("-*")
|| *k == target_keyword
@@ -123,7 +123,7 @@ int do_what_needs_keywording(NoConfigEnvironment & env)
std::string masks;
- for (PackageID::MasksIterator m(p->package_id->begin_masks()), m_end(p->package_id->end_masks()) ;
+ for (PackageID::MasksConstIterator m(p->package_id->begin_masks()), m_end(p->package_id->end_masks()) ;
m != m_end ; ++m)
masks.append(stringify((*m)->key()));
diff --git a/src/clients/contrarius/install.cc b/src/clients/contrarius/install.cc
index 1bb51c0..ac3b4e1 100644
--- a/src/clients/contrarius/install.cc
+++ b/src/clients/contrarius/install.cc
@@ -117,7 +117,7 @@ namespace
"--dl-uninstalled-deps-runtime discard "
"--dl-uninstalled-deps-post discard "
"--install --preserve-world";
- for (PackageIDSequence::Iterator i(p->begin()), i_end(p->end()) ; i != i_end ; ++i)
+ for (PackageIDSequence::ConstIterator i(p->begin()), i_end(p->end()) ; i != i_end ; ++i)
resume_command = resume_command + " '=" + stringify(**i) + "'";
if (CommandLine::get_instance()->a_resume_command_template.specified())
diff --git a/src/clients/contrarius/stage_builder.cc b/src/clients/contrarius/stage_builder.cc
index 5483488..11123c7 100644
--- a/src/clients/contrarius/stage_builder.cc
+++ b/src/clients/contrarius/stage_builder.cc
@@ -39,7 +39,7 @@ OurStageBuilderTask::on_build_all_pre()
<< endl << endl;
int num_stages(0), num_rebuilds(0);
- for (StageIterator s(begin_stages()), s_end(end_stages()) ; s != s_end ; s++)
+ for (StageConstIterator s(begin_stages()), s_end(end_stages()) ; s != s_end ; s++)
{
cout << "o " << colour(cl_key_name, (*s)->short_name()) << endl
<< " " << colour(cl_tag, (*s)->description()) << endl;
diff --git a/src/clients/contrarius/target_config.cc b/src/clients/contrarius/target_config.cc
index e382a3f..9057c14 100644
--- a/src/clients/contrarius/target_config.cc
+++ b/src/clients/contrarius/target_config.cc
@@ -40,7 +40,7 @@ TargetConfig::_parse_defaults()
Context c("While parsing default configuration:");
LineConfigFile defaults(FSEntry(DATADIR "/paludis/contrarius/default_config.txt"), LineConfigFileOptions());
- for (LineConfigFile::Iterator l(defaults.begin()), l_end(defaults.end()) ;
+ for (LineConfigFile::ConstIterator l(defaults.begin()), l_end(defaults.end()) ;
l != l_end ; ++l)
{
Context c2("While parsing line '" + *l + "'");
diff --git a/src/clients/contrarius/target_config.hh b/src/clients/contrarius/target_config.hh
index b6731be..6bbd25b 100644
--- a/src/clients/contrarius/target_config.hh
+++ b/src/clients/contrarius/target_config.hh
@@ -46,7 +46,7 @@ class TargetConfig :
private:
typedef std::list<std::pair<std::string, std::string> > SpecEntryList;
- typedef libwrapiter::ForwardIterator<TargetConfig, const std::string> Iterator;
+ typedef libwrapiter::ForwardIterator<TargetConfig, const std::string> ConstIterator;
SpecEntryList _binutils_list;
diff --git a/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc
index ca2aa90..796bf91 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc
@@ -59,7 +59,7 @@ CategoriesListModel::populate_in_paludis_thread()
if (repos)
{
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
paludis::tr1::shared_ptr<const CategoryNamePartSet> cats(
@@ -69,7 +69,7 @@ CategoriesListModel::populate_in_paludis_thread()
}
else
{
- for (IndirectIterator<PackageDatabase::RepositoryIterator>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
r != r_end ; ++r)
@@ -87,7 +87,7 @@ void
CategoriesListModel::populate_in_gui_thread(paludis::tr1::shared_ptr<const CategoryNamePartSet> names)
{
clear();
- for (CategoryNamePartSet::Iterator n(names->begin()), n_end(names->end()) ;
+ for (CategoryNamePartSet::ConstIterator n(names->begin()), n_end(names->end()) ;
n != n_end ; ++n)
(*append())[_imp->columns.col_cat_name] = stringify(*n);
}
diff --git a/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc b/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc
index ff2a11c..3888ee3 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc
@@ -41,7 +41,7 @@ GuiSyncTask::~GuiSyncTask()
void
GuiSyncTask::on_sync_all_pre()
{
- for (TargetsIterator t(begin_targets()), t_end(end_targets()) ;
+ for (TargetsConstIterator t(begin_targets()), t_end(end_targets()) ;
t != t_end ; ++t)
_imp->task_window->gui_thread_action(
sigc::bind(sigc::mem_fun(_imp->task_window, &TaskWindow::append_sequence_item),
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
index 22c6ebe..42717be 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
@@ -233,7 +233,7 @@ PackagesListModel::populate_in_paludis_thread()
QualifiedPackageName old_qpn("OLD/OLD");
- for (PackageIDSequence::ReverseIterator p(c->rbegin()), p_end(c->rend()) ;
+ for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
p != p_end ; ++p)
{
if (old_qpn != (*p)->name())
@@ -273,7 +273,7 @@ PackagesListModel::populate_in_paludis_thread()
query::Matches(ds),
qo_best_version_in_slot_only));
- for (PackageIDSequence::ReverseIterator p(c->rbegin()), p_end(c->rend()) ;
+ for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
p != p_end ; ++p)
{
atom_iter->children.push_back(make_item(ds,
@@ -292,7 +292,7 @@ PackagesListModel::populate_in_paludis_thread()
QualifiedPackageName old_qpn("OLD/OLD");
std::list<PopulateItem>::iterator pkg_iter;
- for (PackageIDSequence::ReverseIterator p(c->rbegin()), p_end(c->rend()) ;
+ for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
p != p_end ; ++p)
{
if (old_qpn != (*p)->name())
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
index 68fd020..c677397 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
@@ -68,7 +68,7 @@ PackagesRepositoryFilterModel::populate_in_paludis_thread()
{
paludis::tr1::shared_ptr<RepositoryNameSequence> columns(new RepositoryNameSequence);
- for (IndirectIterator<PackageDatabase::RepositoryIterator>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
r != r_end ; ++r)
@@ -85,7 +85,7 @@ PackagesRepositoryFilterModel::populate_in_gui_thread(paludis::tr1::shared_ptr<c
(*repositories)[_imp->columns.col_text] = "Specific repository";
(*repositories)[_imp->columns.col_sensitive] = false;
- for (RepositoryNameSequence::Iterator n(names->begin()), n_end(names->end()) ;
+ for (RepositoryNameSequence::ConstIterator n(names->begin()), n_end(names->end()) ;
n != n_end ; ++n)
{
iterator r(append(repositories->children()));
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc
index 7e2b5c5..107c161 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc
@@ -50,7 +50,7 @@ RepositoriesListModel::populate_in_paludis_thread()
{
tr1::shared_ptr<RepositoryNameSequence> columns(new RepositoryNameSequence);
- for (IndirectIterator<PackageDatabase::RepositoryIterator>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
r != r_end ; ++r)
@@ -64,7 +64,7 @@ void
RepositoriesListModel::populate_in_gui_thread(tr1::shared_ptr<const RepositoryNameSequence> names)
{
clear();
- for (RepositoryNameSequence::Iterator n(names->begin()), n_end(names->end()) ;
+ for (RepositoryNameSequence::ConstIterator n(names->begin()), n_end(names->end()) ;
n != n_end ; ++n)
(*append())[_imp->columns.col_repo_name] = stringify(*n);
}
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc b/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc
index eaec448..7282458 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc
@@ -61,14 +61,14 @@ void
RepositoryInfoModel::set_repository_in_gui_thread(tr1::shared_ptr<const RepositoryInfo> info)
{
clear();
- for (IndirectIterator<RepositoryInfo::SectionIterator>
+ for (IndirectIterator<RepositoryInfo::SectionConstIterator>
s(indirect_iterator(info->begin_sections())), s_end(indirect_iterator(info->end_sections())) ;
s != s_end ; ++s)
{
iterator i(append());
(*i)[_imp->columns.col_key] = s->heading();
- for (RepositoryInfoSection::KeyValueIterator k(s->begin_kvs()), k_end(s->end_kvs()) ;
+ for (RepositoryInfoSection::KeyValueConstIterator k(s->begin_kvs()), k_end(s->end_kvs()) ;
k != k_end ; ++k)
{
iterator j(append(i->children()));
diff --git a/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc
index b798278..283039d 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc
@@ -59,7 +59,7 @@ SetsListModel::populate_in_paludis_thread()
if (repos)
{
- for (RepositoryNameSequence::Iterator r(repos->begin()), r_end(repos->end()) ;
+ for (RepositoryNameSequence::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
RepositorySetsInterface * const i(_imp->main_window->environment()->package_database()->fetch_repository(*r)->sets_interface);
@@ -72,7 +72,7 @@ SetsListModel::populate_in_paludis_thread()
}
else
{
- for (IndirectIterator<PackageDatabase::RepositoryIterator>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
r != r_end ; ++r)
@@ -97,7 +97,7 @@ void
SetsListModel::populate_in_gui_thread(tr1::shared_ptr<const SetNameSet> names)
{
clear();
- for (SetNameSet::Iterator n(names->begin()), n_end(names->end()) ;
+ for (SetNameSet::ConstIterator n(names->begin()), n_end(names->end()) ;
n != n_end ; ++n)
(*append())[_imp->columns.col_set_name] = stringify(*n);
}
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc
index 9c9fc50..98a307c 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc
@@ -111,13 +111,13 @@ VersionsListModel::populate_in_paludis_thread()
query::Package(_imp->query_window->get_package_name()),
qo_order_by_version));
- for (PackageIDSequence::ReverseIterator p(c->rbegin()), p_end(c->rend()) ;
+ for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
p != p_end ; ++p)
{
bool prefer_default(true);
std::string mr_string;
- for (PackageID::MasksIterator m((*p)->begin_masks()), m_end((*p)->end_masks()) ;
+ for (PackageID::MasksConstIterator m((*p)->begin_masks()), m_end((*p)->end_masks()) ;
m != m_end ; ++m)
{
prefer_default = false;
diff --git a/src/clients/inquisitio/do_search.cc b/src/clients/inquisitio/do_search.cc
index c702f79..4d45297 100644
--- a/src/clients/inquisitio/do_search.cc
+++ b/src/clients/inquisitio/do_search.cc
@@ -44,12 +44,12 @@ do_search(const Environment & env)
std::list<tr1::shared_ptr<Matcher> > matchers;
std::list<tr1::shared_ptr<Extractor> > extractors;
- for (CommandLine::ParametersIterator p(CommandLine::get_instance()->begin_parameters()),
+ for (CommandLine::ParametersConstIterator p(CommandLine::get_instance()->begin_parameters()),
p_end(CommandLine::get_instance()->end_parameters()) ; p != p_end ; ++p)
matchers.push_back(MatcherMaker::get_instance()->find_maker(
CommandLine::get_instance()->a_matcher.argument())(*p));
- for (paludis::args::StringSetArg::Iterator p(CommandLine::get_instance()->a_extractors.begin_args()),
+ for (paludis::args::StringSetArg::ConstIterator p(CommandLine::get_instance()->a_extractors.begin_args()),
p_end(CommandLine::get_instance()->a_extractors.end_args()) ; p != p_end ; ++p)
extractors.push_back(ExtractorMaker::get_instance()->find_maker(*p)(env));
@@ -58,7 +58,7 @@ do_search(const Environment & env)
std::set<QualifiedPackageName> pkgs;
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env.package_database()->begin_repositories()), r_end(env.package_database()->end_repositories()) ;
r != r_end ; ++r)
{
@@ -76,7 +76,7 @@ do_search(const Environment & env)
continue;
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
if (CommandLine::get_instance()->a_category.specified())
@@ -87,7 +87,7 @@ do_search(const Environment & env)
continue;
tr1::shared_ptr<const QualifiedPackageNameSet> pkg_names(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
pkgs.insert(*p);
}
@@ -108,7 +108,7 @@ do_search(const Environment & env)
preferred_entries = entries;
tr1::shared_ptr<const PackageID> display_entry(*preferred_entries->last());
- for (PackageIDSequence::Iterator i(preferred_entries->begin()),
+ for (PackageIDSequence::ConstIterator i(preferred_entries->begin()),
i_end(preferred_entries->end()) ; i != i_end ; ++i)
if (! (*i)->masked())
display_entry = *i;
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 3a94ad8..f4726b7 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -308,7 +308,7 @@ main(int argc, char *argv[])
unsigned success(0), total(0);
CategoryNamePart old_cat("OLDCAT");
- for (PackageIDSequence::Iterator i(ids->begin()), i_end(ids->end()) ;
+ for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;
i != i_end ; ++i)
{
Context i_context("When fetching ID '" + stringify(**i) + "':");
@@ -323,7 +323,7 @@ main(int argc, char *argv[])
try
{
- PackageID::MetadataIterator eapi_i((*i)->find_metadata("EAPI"));
+ PackageID::MetadataConstIterator eapi_i((*i)->find_metadata("EAPI"));
if ((*i)->end_metadata() == eapi_i)
{
results.insert(std::make_pair(*i, "No EAPI metadata key"));
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
bool metadata_errors(false);
KeyValidator v;
- for (PackageID::MetadataIterator m((*i)->begin_metadata()),
+ for (PackageID::MetadataConstIterator m((*i)->begin_metadata()),
m_end((*i)->end_metadata()); m_end != m; ++m)
{
try
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index 59ac2b6..ba5ec1a 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -128,7 +128,7 @@ int do_match(tr1::shared_ptr<Environment> env)
return_code = 1;
else
{
- for (PackageIDSequence::Iterator i(entries->begin()), i_end(entries->end()) ; i != i_end ; ++i)
+ for (PackageIDSequence::ConstIterator i(entries->begin()), i_end(entries->end()) ; i != i_end ; ++i)
{
// don't include repo, it breaks built_with_use and the like.
std::string entry(
@@ -187,9 +187,9 @@ int do_configuration_variable(tr1::shared_ptr<Environment> env)
RepositoryName(repo_str))->info(false));
return_code = 1;
- for (RepositoryInfo::SectionIterator s(info->begin_sections()),
+ for (RepositoryInfo::SectionConstIterator s(info->begin_sections()),
s_end(info->end_sections()) ; s != s_end ; ++s)
- for (RepositoryInfoSection::KeyValueIterator k((*s)->begin_kvs()),
+ for (RepositoryInfoSection::KeyValueConstIterator k((*s)->begin_kvs()),
k_end((*s)->end_kvs()) ; k != k_end ; ++k)
if (var_str == k->first)
{
@@ -224,7 +224,7 @@ int do_list_sync_protocols(tr1::shared_ptr<Environment> env)
std::map<std::string, std::string> syncers;
tr1::shared_ptr<const FSEntrySequence> sd(env->syncers_dirs());
- for (FSEntrySequence::Iterator d(sd->begin()),
+ for (FSEntrySequence::ConstIterator d(sd->begin()),
d_end(sd->end()) ; d != d_end ; ++d)
{
FSEntry dir(*d);
@@ -288,7 +288,7 @@ int do_regenerate_cache(tr1::shared_ptr<Environment> env, bool installed)
if (! CommandLine::get_instance()->empty())
{
- CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters());
for ( ; q != q_end ; ++q)
{
@@ -301,7 +301,7 @@ int do_regenerate_cache(tr1::shared_ptr<Environment> env, bool installed)
}
else
{
- for (PackageDatabase::RepositoryIterator r(env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(env->package_database()->begin_repositories()),
r_end(env->package_database()->end_repositories()) ; r != r_end ; ++r)
{
if (installed != (0 != (*r)->installed_interface))
diff --git a/src/clients/paludis/do_config.cc b/src/clients/paludis/do_config.cc
index 3024f52..f353059 100644
--- a/src/clients/paludis/do_config.cc
+++ b/src/clients/paludis/do_config.cc
@@ -98,7 +98,7 @@ do_config(tr1::shared_ptr<Environment> env)
Context context("When performing config action from command line:");
- CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters());
for ( ; q != q_end ; ++q)
{
@@ -112,7 +112,7 @@ do_config(tr1::shared_ptr<Environment> env)
cerr << "Query error:" << endl;
cerr << " * " << e.backtrace("\n * ");
cerr << "Ambiguous package name '" << e.name() << "'. Did you mean:" << endl;
- for (AmbiguousPackageNameError::OptionsIterator o(e.begin_options()),
+ for (AmbiguousPackageNameError::OptionsConstIterator o(e.begin_options()),
o_end(e.end_options()) ; o != o_end ; ++o)
cerr << " * " << colour(cl_package_name, *o) << endl;
cerr << endl;
@@ -123,7 +123,7 @@ do_config(tr1::shared_ptr<Environment> env)
cerr << "Query error:" << endl;
cerr << " * " << e.backtrace("\n * ");
cerr << "Ambiguous config target '" << *q << "'. Did you mean:" << endl;
- for (PackageIDSequence::Iterator o(e.matches->begin()),
+ for (PackageIDSequence::ConstIterator o(e.matches->begin()),
o_end(e.matches->end()) ; o != o_end ; ++o)
cerr << " * =" << colour(cl_package_name, **o) << endl;
cerr << endl;
diff --git a/src/clients/paludis/do_contents.cc b/src/clients/paludis/do_contents.cc
index bf89ba5..ca9eca9 100644
--- a/src/clients/paludis/do_contents.cc
+++ b/src/clients/paludis/do_contents.cc
@@ -107,7 +107,7 @@ do_one_contents(
if (entries->empty())
throw NoSuchPackageError(q);
- for (PackageIDSequence::Iterator i(entries->begin()),
+ for (PackageIDSequence::ConstIterator i(entries->begin()),
i_end(entries->end()) ; i != i_end ; ++i)
do_one_contents_entry(env, **i);
}
@@ -119,7 +119,7 @@ do_contents(tr1::shared_ptr<Environment> env)
Context context("When performing contents action from command line:");
- CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters());
for ( ; q != q_end ; ++q)
{
@@ -133,7 +133,7 @@ do_contents(tr1::shared_ptr<Environment> env)
cerr << "Query error:" << endl;
cerr << " * " << e.backtrace("\n * ");
cerr << "Ambiguous package name '" << e.name() << "'. Did you mean:" << endl;
- for (AmbiguousPackageNameError::OptionsIterator o(e.begin_options()),
+ for (AmbiguousPackageNameError::OptionsConstIterator o(e.begin_options()),
o_end(e.end_options()) ; o != o_end ; ++o)
cerr << " * " << colour(cl_package_name, *o) << endl;
cerr << endl;
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index 648fc95..2a8ee88 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -62,7 +62,7 @@ int do_one_info(
preferred_entries = entries;
tr1::shared_ptr<const PackageID> display_entry(*preferred_entries->last());
- for (PackageIDSequence::Iterator i(preferred_entries->begin()),
+ for (PackageIDSequence::ConstIterator i(preferred_entries->begin()),
i_end(preferred_entries->end()) ; i != i_end ; ++i)
if (! (*i)->masked())
display_entry = *i;
@@ -133,18 +133,18 @@ do_info(const tr1::shared_ptr<const Environment> & env)
cout << endl;
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env->package_database()->begin_repositories()), r_end(env->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
cout << "Repository " << colour(cl_repository_name, r->name()) << ":" << endl;
tr1::shared_ptr<const RepositoryInfo> ii(r->info(true));
- for (RepositoryInfo::SectionIterator i(ii->begin_sections()),
+ for (RepositoryInfo::SectionConstIterator i(ii->begin_sections()),
i_end(ii->end_sections()) ; i != i_end ; ++i)
{
cout << " " << colour(cl_heading, (*i)->heading() + ":") << endl;
- for (RepositoryInfoSection::KeyValueIterator k((*i)->begin_kvs()),
+ for (RepositoryInfoSection::KeyValueConstIterator k((*i)->begin_kvs()),
k_end((*i)->end_kvs()) ; k != k_end ; ++k)
cout << " " << std::setw(22) << std::left << (stringify(k->first) + ":")
<< std::setw(0) << " " << k->second << endl;
@@ -162,7 +162,7 @@ do_info(const tr1::shared_ptr<const Environment> & env)
}
else
{
- for (CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ for (CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters()) ;
q != q_end ; ++q)
{
@@ -176,7 +176,7 @@ do_info(const tr1::shared_ptr<const Environment> & env)
cout << "Query error:" << endl;
cout << " * " << e.backtrace("\n * ");
cout << "Ambiguous package name '" << e.name() << "'. Did you mean:" << endl;
- for (AmbiguousPackageNameError::OptionsIterator o(e.begin_options()),
+ for (AmbiguousPackageNameError::OptionsConstIterator o(e.begin_options()),
o_end(e.end_options()) ; o != o_end ; ++o)
cout << " * " << colour(cl_package_name, *o) << endl;
cout << endl;
diff --git a/src/clients/paludis/install.cc b/src/clients/paludis/install.cc
index 78326e5..67ee442 100644
--- a/src/clients/paludis/install.cc
+++ b/src/clients/paludis/install.cc
@@ -77,7 +77,7 @@ namespace
+ " --" + CommandLine::get_instance()->dl_deps_default.long_name() + " discard --"
+ CommandLine::get_instance()->a_install.long_name();
- for (PackageIDSequence::Iterator i(s.begin()), i_end(s.end()) ;
+ for (PackageIDSequence::ConstIterator i(s.begin()), i_end(s.end()) ;
i != i_end ; ++i)
resume_command = resume_command + " '=" + stringify(**i) + "'";
@@ -95,7 +95,7 @@ namespace
}
if (CommandLine::get_instance()->a_destinations.specified())
- for (args::StringSetArg::Iterator i(CommandLine::get_instance()->a_destinations.begin_args()),
+ for (args::StringSetArg::ConstIterator i(CommandLine::get_instance()->a_destinations.begin_args()),
i_end(CommandLine::get_instance()->a_destinations.end_args()) ;
i != i_end ; ++i)
resume_command = resume_command + " --" + CommandLine::get_instance()->a_destinations.long_name()
@@ -434,7 +434,7 @@ do_install(tr1::shared_ptr<Environment> env)
if (CommandLine::get_instance()->dl_override_masks.specified())
{
- for (args::StringSetArg::Iterator a(CommandLine::get_instance()->dl_override_masks.begin_args()),
+ for (args::StringSetArg::ConstIterator a(CommandLine::get_instance()->dl_override_masks.begin_args()),
a_end(CommandLine::get_instance()->dl_override_masks.end_args()) ; a != a_end ; ++a)
{
if (! options.override_masks)
@@ -517,7 +517,7 @@ do_install(tr1::shared_ptr<Environment> env)
Context local_context("When building destinations collection:");
tr1::shared_ptr<DestinationsSet> d(new DestinationsSet);
- for (args::StringSetArg::Iterator i(CommandLine::get_instance()->a_destinations.begin_args()),
+ for (args::StringSetArg::ConstIterator i(CommandLine::get_instance()->a_destinations.begin_args()),
i_end(CommandLine::get_instance()->a_destinations.end_args()) ;
i != i_end ; ++i)
{
@@ -580,7 +580,7 @@ do_install(tr1::shared_ptr<Environment> env)
InstallKilledCatcher install_killed_catcher(env, task);
cout << "Building target list... " << std::flush;
- for (CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ for (CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters()) ; q != q_end ; ++q)
task.add_target(*q);
cout << endl;
diff --git a/src/clients/paludis/list.cc b/src/clients/paludis/list.cc
index 942caee..6849460 100644
--- a/src/clients/paludis/list.cc
+++ b/src/clients/paludis/list.cc
@@ -44,7 +44,7 @@ do_list_repositories(tr1::shared_ptr<Environment> env)
Context context("When performing list-repositories action from command line:");
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env->package_database()->begin_repositories()), r_end(env->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
@@ -66,11 +66,11 @@ do_list_repositories(tr1::shared_ptr<Environment> env)
std::cout << "* " << colour(cl_repository_name, r->name()) << std::endl;
tr1::shared_ptr<const RepositoryInfo> ii(r->info(false));
- for (RepositoryInfo::SectionIterator i(ii->begin_sections()),
+ for (RepositoryInfo::SectionConstIterator i(ii->begin_sections()),
i_end(ii->end_sections()) ; i != i_end ; ++i)
{
std::cout << " " << colour(cl_heading, (*i)->heading() + ":") << std::endl;
- for (RepositoryInfoSection::KeyValueIterator k((*i)->begin_kvs()),
+ for (RepositoryInfoSection::KeyValueConstIterator k((*i)->begin_kvs()),
k_end((*i)->end_kvs()) ; k != k_end ; ++k)
std::cout << " " << std::setw(22) << std::left << (stringify(k->first) + ":")
<< std::setw(0) << " " << k->second << std::endl;
@@ -90,7 +90,7 @@ do_list_categories(tr1::shared_ptr<Environment> env)
std::map<CategoryNamePart, std::list<RepositoryName> > cats;
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env->package_database()->begin_repositories()), r_end(env->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
@@ -108,7 +108,7 @@ do_list_categories(tr1::shared_ptr<Environment> env)
continue;
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
cats[*c].push_back(r->name());
}
@@ -143,7 +143,7 @@ do_list_packages(tr1::shared_ptr<Environment> env)
std::map<QualifiedPackageName, std::list<RepositoryName> > pkgs;
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env->package_database()->begin_repositories()), r_end(env->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
@@ -161,7 +161,7 @@ do_list_packages(tr1::shared_ptr<Environment> env)
continue;
tr1::shared_ptr<const CategoryNamePartSet> cat_names(r->category_names());
- for (CategoryNamePartSet::Iterator c(cat_names->begin()), c_end(cat_names->end()) ;
+ for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
if (CommandLine::get_instance()->a_category.specified())
@@ -172,7 +172,7 @@ do_list_packages(tr1::shared_ptr<Environment> env)
continue;
tr1::shared_ptr<const QualifiedPackageNameSet> pkg_names(r->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
+ for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
pkgs[*p].push_back(r->name());
}
@@ -208,7 +208,7 @@ do_list_sets(tr1::shared_ptr<Environment> env)
std::map<SetName, std::list<std::string> > sets;
- for (IndirectIterator<PackageDatabase::RepositoryIterator, const Repository>
+ for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
r(env->package_database()->begin_repositories()), r_end(env->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
@@ -229,7 +229,7 @@ do_list_sets(tr1::shared_ptr<Environment> env)
continue;
tr1::shared_ptr<const SetNameSet> set_names(r->sets_interface->sets_list());
- for (SetNameSet::Iterator s(set_names->begin()), s_end(set_names->end()) ;
+ for (SetNameSet::ConstIterator s(set_names->begin()), s_end(set_names->end()) ;
s != s_end ; ++s)
sets[*s].push_back(stringify(r->name()));
}
@@ -237,7 +237,7 @@ do_list_sets(tr1::shared_ptr<Environment> env)
if (! CommandLine::get_instance()->a_repository.specified())
{
tr1::shared_ptr<const SetNameSet> set_names(env->set_names());
- for (SetNameSet::Iterator s(set_names->begin()), s_end(set_names->end()) ;
+ for (SetNameSet::ConstIterator s(set_names->begin()), s_end(set_names->end()) ;
s != s_end ; ++s)
sets[*s].push_back("environment");
}
diff --git a/src/clients/paludis/owner.cc b/src/clients/paludis/owner.cc
index 731918a..e93c2d2 100644
--- a/src/clients/paludis/owner.cc
+++ b/src/clients/paludis/owner.cc
@@ -95,22 +95,22 @@ do_one_owner(
bool found_owner=false;
cout << "* " << colour(cl_package_name, query) << endl;
- for (PackageDatabase::RepositoryIterator r(env->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator r(env->package_database()->begin_repositories()),
r_end(env->package_database()->end_repositories()) ; r != r_end ; ++r)
{
if (! (*r)->installed_interface)
continue;
tr1::shared_ptr<const CategoryNamePartSet> cats((*r)->category_names());
- for (CategoryNamePartSet::Iterator c(cats->begin()),
+ for (CategoryNamePartSet::ConstIterator c(cats->begin()),
c_end(cats->end()) ; c != c_end ; ++c)
{
tr1::shared_ptr<const QualifiedPackageNameSet> pkgs((*r)->package_names(*c));
- for (QualifiedPackageNameSet::Iterator p(pkgs->begin()),
+ for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()),
p_end(pkgs->end()) ; p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> ids((*r)->package_ids(*p));
- for (PackageIDSequence::Iterator v(ids->begin()), v_end(ids->end()) ; v != v_end ; ++v)
+ for (PackageIDSequence::ConstIterator v(ids->begin()), v_end(ids->end()) ; v != v_end ; ++v)
{
if (! (*v)->contents_key())
continue;
@@ -138,7 +138,7 @@ do_owner(tr1::shared_ptr<Environment> env)
int return_code(0);
Context context("When performing owner action from command line:");
- CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters());
for ( ; q != q_end ; ++q)
return_code |= do_one_owner(env, *q);
diff --git a/src/clients/paludis/query.cc b/src/clients/paludis/query.cc
index 148c4fc..159c866 100644
--- a/src/clients/paludis/query.cc
+++ b/src/clients/paludis/query.cc
@@ -146,7 +146,7 @@ int do_query(tr1::shared_ptr<Environment> env)
tr1::shared_ptr<Map<char, std::string> > masks_to_explain(new Map<char, std::string>());
- CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters());
for ( ; q != q_end ; ++q)
{
@@ -160,7 +160,7 @@ int do_query(tr1::shared_ptr<Environment> env)
cerr << "Query error:" << endl;
cerr << " * " << e.backtrace("\n * ");
cerr << "Ambiguous package name '" << e.name() << "'. Did you mean:" << endl;
- for (AmbiguousPackageNameError::OptionsIterator o(e.begin_options()),
+ for (AmbiguousPackageNameError::OptionsConstIterator o(e.begin_options()),
o_end(e.end_options()) ; o != o_end ; ++o)
cerr << " * " << colour(cl_package_name, *o) << endl;
cerr << endl;
@@ -187,7 +187,7 @@ int do_query(tr1::shared_ptr<Environment> env)
{
cout << colour(cl_heading, "Key to mask reasons:") << endl << endl;
- for (Map<char, std::string>::Iterator m(masks_to_explain->begin()), m_end(masks_to_explain->end()) ;
+ for (Map<char, std::string>::ConstIterator m(masks_to_explain->begin()), m_end(masks_to_explain->end()) ;
m != m_end ; ++m)
cout << "* " << colour(cl_masked, m->first) << ": " << m->second << endl;
diff --git a/src/clients/paludis/report.cc b/src/clients/paludis/report.cc
index bfba935..0f964eb 100644
--- a/src/clients/paludis/report.cc
+++ b/src/clients/paludis/report.cc
@@ -101,7 +101,7 @@ namespace
cout << endl << " Masked by: ";
bool comma(false);
- for (PackageID::MasksIterator m(origin->begin_masks()), m_end(origin->end_masks()) ;
+ for (PackageID::MasksConstIterator m(origin->begin_masks()), m_end(origin->end_masks()) ;
m != m_end ; ++m)
{
if (comma)
diff --git a/src/clients/paludis/sync.cc b/src/clients/paludis/sync.cc
index cfa3c2b..ede2b85 100644
--- a/src/clients/paludis/sync.cc
+++ b/src/clients/paludis/sync.cc
@@ -116,7 +116,7 @@ int do_sync(tr1::shared_ptr<Environment> env)
OurSyncTask task(env);
- for (CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ for (CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters()) ; q != q_end ; ++q)
task.add_target(*q);
diff --git a/src/clients/paludis/uninstall.cc b/src/clients/paludis/uninstall.cc
index 4d75570..f251180 100644
--- a/src/clients/paludis/uninstall.cc
+++ b/src/clients/paludis/uninstall.cc
@@ -126,7 +126,7 @@ namespace
else
max_count = std::numeric_limits<long>::max();
- for (Set<tr1::shared_ptr<DepTag> >::Iterator
+ for (Set<tr1::shared_ptr<DepTag> >::ConstIterator
tag(d.tags->begin()),
tag_end(d.tags->end()) ;
tag != tag_end ; ++tag)
@@ -235,7 +235,7 @@ namespace
if (unused)
task.add_unused();
else
- for (CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
+ for (CommandLine::ParametersConstIterator q(CommandLine::get_instance()->begin_parameters()),
q_end(CommandLine::get_instance()->end_parameters()) ; q != q_end ; ++q)
task.add_target(*q);
@@ -249,7 +249,7 @@ namespace
cerr << "Query error:" << endl;
cerr << " * " << e.backtrace("\n * ");
cerr << "Ambiguous unmerge target '" << e.target() << "'. Did you mean:" << endl;
- for (AmbiguousUnmergeTargetError::Iterator o(e.begin()),
+ for (AmbiguousUnmergeTargetError::ConstIterator o(e.begin()),
o_end(e.end()) ; o != o_end ; ++o)
cerr << " * =" << colour(cl_package_name, **o) << endl;
cerr << endl;
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 03115a0..e333cd5 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -203,7 +203,7 @@ namespace
if (! msg.associated_ids->empty())
{
- for (PackageIDSet::Iterator i(msg.associated_ids->begin()),
+ for (PackageIDSet::ConstIterator i(msg.associated_ids->begin()),
i_end(msg.associated_ids->end()) ; i != i_end ; ++i)
if (! (*i)->fs_location_key() || (*i)->fs_location_key()->value() != msg.entry)
std::cout << " " << stringify(**i) << std::endl;
@@ -211,7 +211,7 @@ namespace
if (! msg.associated_keys->empty())
{
- for (QAMessage::KeysSequence::Iterator i(msg.associated_keys->begin()),
+ for (QAMessage::KeysSequence::ConstIterator i(msg.associated_keys->begin()),
i_end(msg.associated_keys->end()) ; i != i_end ; ++i)
{
MetadataKeyPrettyPrinter pp;
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index ede4380..a762b83 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -172,7 +172,7 @@ ConsoleInstallTask::on_display_merge_list_post()
display_merge_list_post_tags();
display_merge_list_post_use_descriptions("");
- for (UseFlagNameSet::Iterator f(_all_expand_prefixes->begin()),
+ for (UseFlagNameSet::ConstIterator f(_all_expand_prefixes->begin()),
f_end(_all_expand_prefixes->end()) ; f != f_end ; ++f)
display_merge_list_post_use_descriptions(stringify(*f));
}
@@ -479,7 +479,7 @@ ConsoleInstallTask::display_merge_list_post_tags()
return;
std::set<std::string> tag_categories;
- for (Set<DepTagEntry>::Iterator a(all_tags()->begin()),
+ for (Set<DepTagEntry>::ConstIterator a(all_tags()->begin()),
a_end(all_tags()->end()) ; a != a_end ; ++a)
tag_categories.insert(a->tag->category());
@@ -497,7 +497,7 @@ ConsoleInstallTask::display_merge_list_post_tags()
display_tag_summary_tag_title(*c);
display_tag_summary_tag_pre_text(*c);
- for (Set<DepTagEntry>::Iterator t(all_tags()->begin()),
+ for (Set<DepTagEntry>::ConstIterator t(all_tags()->begin()),
t_end(all_tags()->end()) ; t != t_end ; ++t)
{
if (t->tag->category() != *cat)
@@ -522,7 +522,7 @@ ConsoleInstallTask::display_merge_list_post_use_descriptions(const std::string &
tr1::shared_ptr<Set<UseDescription, UseDescriptionComparator> > group(
new Set<UseDescription, UseDescriptionComparator>);
- for (Set<UseDescription, UseDescriptionComparator>::Iterator i(all_use_descriptions()->begin()),
+ for (Set<UseDescription, UseDescriptionComparator>::ConstIterator i(all_use_descriptions()->begin()),
i_end(all_use_descriptions()->end()) ; i != i_end ; ++i)
{
switch (i->state)
@@ -546,7 +546,7 @@ ConsoleInstallTask::display_merge_list_post_use_descriptions(const std::string &
if (prefix.empty())
{
bool prefixed(false);
- for (UseFlagNameSet::Iterator f(_all_expand_prefixes->begin()),
+ for (UseFlagNameSet::ConstIterator f(_all_expand_prefixes->begin()),
f_end(_all_expand_prefixes->end()) ; f != f_end && ! prefixed ; ++f)
if (stringify(*f).length() < stringify(i->flag).length())
if (0 == stringify(i->flag).compare(0, stringify(*f).length(), stringify(*f)))
@@ -599,8 +599,8 @@ ConsoleInstallTask::display_use_summary_start(const std::string & prefix)
void
ConsoleInstallTask::display_use_summary_flag(const std::string & prefix,
- Set<UseDescription, UseDescriptionComparator>::Iterator i,
- Set<UseDescription, UseDescriptionComparator>::Iterator i_end)
+ Set<UseDescription, UseDescriptionComparator>::ConstIterator i,
+ Set<UseDescription, UseDescriptionComparator>::ConstIterator i_end)
{
Log::get_instance()->message(ll_debug, lc_context) << "display_use_summary_flag: prefix is '" << prefix
<< "', i->flag is '" << i->flag << "', i->package_id is '" << *i->package_id << "', i->state is '" << i->state
@@ -616,7 +616,7 @@ ConsoleInstallTask::display_use_summary_flag(const std::string & prefix,
else
{
bool all_same(true);
- for (Set<UseDescription, UseDescriptionComparator>::Iterator j(next(i)) ; all_same && j != i_end ; ++j)
+ for (Set<UseDescription, UseDescriptionComparator>::ConstIterator j(next(i)) ; all_same && j != i_end ; ++j)
if (j->description != i->description)
all_same = false;
@@ -930,7 +930,7 @@ void
ConsoleInstallTask::_add_descriptions(tr1::shared_ptr<const UseFlagNameSet> c,
const tr1::shared_ptr<const PackageID> & p, UseDescriptionState s)
{
- for (UseFlagNameSet::Iterator f(c->begin()), f_end(c->end()) ;
+ for (UseFlagNameSet::ConstIterator f(c->begin()), f_end(c->end()) ;
f != f_end ; ++f)
{
std::string d;
@@ -945,7 +945,7 @@ ConsoleInstallTask::_add_descriptions(tr1::shared_ptr<const UseFlagNameSet> c,
.package_id(p)
.description(d));
- Set<UseDescription, UseDescriptionComparator>::Iterator x(_all_use_descriptions->find(e));
+ Set<UseDescription, UseDescriptionComparator>::ConstIterator x(_all_use_descriptions->find(e));
if (_all_use_descriptions->end() == x)
_all_use_descriptions->insert(e);
else
@@ -1000,7 +1000,7 @@ ConsoleInstallTask::display_merge_list_entry_tags(const DepListEntry & d, const
std::string tag_titles;
- for (Set<DepTagEntry>::Iterator
+ for (Set<DepTagEntry>::ConstIterator
tag(d.tags->begin()),
tag_end(d.tags->end()) ;
tag != tag_end ; ++tag)
@@ -1043,7 +1043,7 @@ ConsoleInstallTask::display_merge_list_entry_tags(const DepListEntry & d, const
std::set<std::string> dependents, unsatisfied_dependents;
unsigned c(0), max_c(want_full_install_reasons() ? std::numeric_limits<long>::max() : 3);
- for (Set<DepTagEntry>::Iterator
+ for (Set<DepTagEntry>::ConstIterator
tag(d.tags->begin()),
tag_end(d.tags->end()) ;
tag != tag_end ; ++tag)
@@ -1157,7 +1157,7 @@ ConsoleInstallTask::display_merge_list_entry_mask_reasons(const DepListEntry & e
bool need_comma(false);
output_no_endl(" Masked by: ");
- for (PackageID::MasksIterator m(e.package_id->begin_masks()), m_end(e.package_id->end_masks()) ;
+ for (PackageID::MasksConstIterator m(e.package_id->begin_masks()), m_end(e.package_id->end_masks()) ;
m != m_end ; ++m)
{
if (need_comma)
@@ -1177,7 +1177,7 @@ ConsoleInstallTask::on_ambiguous_package_name_error(const AmbiguousPackageNameEr
output_stream() << "Query error:" << endl;
output_stream() << " * " << e.backtrace("\n * ");
output_stream() << "Ambiguous package name '" << e.name() << "'. Did you mean:" << endl;
- for (AmbiguousPackageNameError::OptionsIterator o(e.begin_options()),
+ for (AmbiguousPackageNameError::OptionsConstIterator o(e.begin_options()),
o_end(e.end_options()) ; o != o_end ; ++o)
output_stream() << " * " << colour(cl_package_name, *o) << endl;
output_stream() << endl;
@@ -1205,7 +1205,7 @@ ConsoleInstallTask::on_fetch_action_error(const FetchActionError & e)
if (e.failures())
{
- for (Sequence<FetchActionFailure>::Iterator f(e.failures()->begin()), f_end(e.failures()->end()) ;
+ for (Sequence<FetchActionFailure>::ConstIterator f(e.failures()->begin()), f_end(e.failures()->end()) ;
f != f_end ; ++f)
{
output_stream() << " * File '" << f->target_file << "': ";
@@ -1270,13 +1270,13 @@ ConsoleInstallTask::on_all_masked_error(const AllMaskedError & e)
output_stream() << "Query error:" << endl;
output_stream() << " * " << e.backtrace("\n * ");
output_stream() << "All versions of '" << e.query() << "' are masked. Candidates are:" << endl;
- for (PackageIDSequence::Iterator pp(p->begin()), pp_end(p->end()) ;
+ for (PackageIDSequence::ConstIterator pp(p->begin()), pp_end(p->end()) ;
pp != pp_end ; ++pp)
{
output_stream() << " * " << colour(cl_package_name, **pp) << ": Masked by ";
bool need_comma(false);
- for (PackageID::MasksIterator m((*pp)->begin_masks()), m_end((*pp)->end_masks()) ;
+ for (PackageID::MasksConstIterator m((*pp)->begin_masks()), m_end((*pp)->end_masks()) ;
m != m_end ; ++m)
{
if (need_comma)
diff --git a/src/output/console_install_task.hh b/src/output/console_install_task.hh
index 42e025b..d66a358 100644
--- a/src/output/console_install_task.hh
+++ b/src/output/console_install_task.hh
@@ -232,8 +232,8 @@ namespace paludis
virtual void display_merge_list_post_use_descriptions(const std::string &);
virtual void display_use_summary_start(const std::string &);
virtual void display_use_summary_flag(const std::string &,
- Set<UseDescription, UseDescriptionComparator>::Iterator,
- Set<UseDescription, UseDescriptionComparator>::Iterator);
+ Set<UseDescription, UseDescriptionComparator>::ConstIterator,
+ Set<UseDescription, UseDescriptionComparator>::ConstIterator);
virtual void display_use_summary_end();
virtual void show_resume_command() const = 0;
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index 6d3e601..169484a 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -85,7 +85,7 @@ ConsoleQueryTask::show(const PackageDepSpec & a, tr1::shared_ptr<const PackageID
if (! display_entry)
{
display_entry = *preferred_entries->last();
- for (PackageIDSequence::Iterator i(preferred_entries->begin()),
+ for (PackageIDSequence::ConstIterator i(preferred_entries->begin()),
i_end(preferred_entries->end()) ; i != i_end ; ++i)
if (! (*i)->masked())
display_entry = *i;
@@ -115,13 +115,13 @@ ConsoleQueryTask::display_versions_by_repository(const PackageDepSpec &,
{
/* find all repository names. */
RepositoryNameSequence repo_names;
- PackageIDSequence::Iterator e(entries->begin()), e_end(entries->end());
+ PackageIDSequence::ConstIterator e(entries->begin()), e_end(entries->end());
for ( ; e != e_end ; ++e)
if (repo_names.end() == std::find(repo_names.begin(), repo_names.end(), (*e)->repository()->name()))
repo_names.push_back((*e)->repository()->name());
/* display versions, by repository. */
- RepositoryNameSequence::Iterator r(repo_names.begin()), r_end(repo_names.end());
+ RepositoryNameSequence::ConstIterator r(repo_names.begin()), r_end(repo_names.end());
for ( ; r != r_end ; ++r)
{
output_left_column(stringify(*r) + ":");
@@ -146,7 +146,7 @@ ConsoleQueryTask::display_versions_by_repository(const PackageDepSpec &,
else
{
std::string reasons;
- for (PackageID::MasksIterator m((*e)->begin_masks()), m_end((*e)->end_masks()) ;
+ for (PackageID::MasksConstIterator m((*e)->begin_masks()), m_end((*e)->end_masks()) ;
m != m_end ; ++m)
{
reasons.append(stringify((*m)->key()));
@@ -453,7 +453,7 @@ namespace
{
task->output_left_column(k.human_name() + ":");
task->output_right_column(stringify(k.value()->mask_file) + ":");
- for (Sequence<std::string>::Iterator it(k.value()->comment->begin()),
+ for (Sequence<std::string>::ConstIterator it(k.value()->comment->begin()),
it_end(k.value()->comment->end()); it_end != it; ++it)
{
task->output_left_column("");
@@ -511,7 +511,7 @@ ConsoleQueryTask::display_metadata(const PackageDepSpec &, const tr1::shared_ptr
void
ConsoleQueryTask::display_masks(const PackageDepSpec &, const tr1::shared_ptr<const PackageID> & id) const
{
- for (PackageID::MasksIterator m(id->begin_masks()), m_end(id->end_masks()) ;
+ for (PackageID::MasksConstIterator m(id->begin_masks()), m_end(id->end_masks()) ;
m != m_end ; ++m)
{
MaskDisplayer d(_imp->env, id, false);