aboutsummaryrefslogtreecommitdiff
path: root/paludis
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 /paludis
parentfa16225ca76ef2bf07174aee6460264c63f2b104 (diff)
downloadpaludis-8aca0f10d1934e4d0170df3eea4c6ab1428a7027.tar.gz
paludis-8aca0f10d1934e4d0170df3eea4c6ab1428a7027.tar.xz
Rename const iterators to ConstIterator, mutable to Iterator. Fixes: ticket:365
Diffstat (limited to 'paludis')
-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
138 files changed, 910 insertions, 909 deletions
diff --git a/paludis/action.cc b/paludis/action.cc
index 876e473c7..e02b4e8e1 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 ec7a2577c..d126f1fff 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 66f9e5027..f92059a6d 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 f833611bf..671f3a121 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 ec945525a..31bac4226 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 fbff4da83..efb3da56b 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 62d6c0970..16ae95443 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 b8fc2f43f..c61a145f8 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 d091bdba4..e5ec96594 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 37066ad6b..245de485b 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 1d83eb800..ecbf94ec7 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 121e796bb..3dda65593 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 d5e3182a0..d2e82045a 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 3c396c34e..9d004fd3c 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 980b305f8..8d900d989 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 df086dd91..2f0191fcd 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 1e7a6b8c9..c753b64fb 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 d5ac3f49f..462001605 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 08a3561e9..c26cfc400 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 bb6ed7a6c..cf9c2c37b 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 00a4a330c..4eefb585f 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 d919f6ca2..31c6e2294 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 1cff33da4..3e5ceec0a 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 c5457d206..4cbb79e8e 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 2cd16c8af..f1da98e5c 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 06ef73722..36675530a 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 8c63f48c2..2d247f968 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 8f7916abc..eac8fc64d 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 c1177dde8..e5ff57792 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 8718ff8cb..771e098a5 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 4edc81276..a214ff25b 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 ba9f936b0..5e9d4276d 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 0e1144f38..6963d4557 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 06db653df..794acb418 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 1f3bd4ccc..f087433f0 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 228628fa5..a52d499dc 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 4d62ca25b..004cf85cf 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 67702f2b0..3cd13ca63 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 4193fc15f..26f8796f9 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 a2533b86d..53aa44ae0 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 5763bdbcf..38ba5c2ba 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 94e5f834c..22f7b7ddc 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 2efbbb9dd..78beb0f78 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 3e6ba1012..6e4ce34a7 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 963f9a85f..4acaf433f 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 27ef9c838..36679b245 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 913f5feab..4c8a927a0 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 0707b7fe9..301f5ab78 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 df2a6675d..3eecf76ed 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 be68e43c8..93d3afd28 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 1b8757eca..e87b944b8 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 548c324be..9170ad9fd 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 8949d5364..60ab723d7 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 22dbe6793..5707efbba 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 ebd4badea..27fa01285 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 c1cd98031..04ee6febf 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 91d2f0fcb..553e227d6 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 5c618b7a5..e050bba07 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 34649b0d8..39d369faf 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 807185fe8..a90b8da9d 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 723726836..69b51da98 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 6c5579f74..4481b5b72 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 886542d7c..eba55a9e8 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 1ecf79395..a1b5ae6ca 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 b6dff8248..464fa955f 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 205c691d2..1ed2768a3 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 6abeb2efd..32ed76416 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 a64301290..df450419e 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 64d8c8402..12aa34055 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 4c11f2922..414da4066 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 64a3e1030..59165ecbe 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 f256bdb1b..a5e552583 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 ab299ae67..7d365bf1d 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 d850b35f9..212a5fd71 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 85cb63825..abee083b0 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 f690b7ae7..2ca8a60a4 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 a7d3dbc67..f469882b7 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 7235818f7..7bfbfc90a 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 332cd67e1..95ec239f5 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 779eb46ba..58f952793 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 7fa03f806..e412917bb 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 7dc1d52f4..7d81e1619 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 978ba83b6..7cd19406b 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 d2f8111ce..262b5add7 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 607719bc0..30379e68e 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 0cc0e8eda..dccf9c716 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 916ff4eb0..a817a092e 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 250ae622a..f9f9cae62 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 2f73f0049..a2b64da98 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 9a5663325..49a535b9e 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 6ca96a553..3a370e53e 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 c8e1b0a5a..608a9d3c7 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 4030c0576..9ced042b0 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 90f5ac98a..3dd6bd9b9 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 219378bd0..03f25a649 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 c3aa54b44..504db03a9 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 b7d164790..7eedf4b90 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 ac35ad9db..397d6d2f0 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 26cf24f1e..f3db1e3e6 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 42a08a36b..02563e04b 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 2ce566be1..d2514ddb1 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 2ed6c94f7..f240d1b18 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 6e3a20ab9..fe45512d6 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 9bad77776..989f1d12e 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 d85da734e..fa8f2aaa3 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 22eed210e..f10af86e9 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 c45913145..fc74aa7d3 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 52bb1bb8d..fc743b80f 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 b135fb45c..ddf5b6d2f 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 df090109c..2b6f7b708 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 f152e8ae1..e065f0f53 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 42cc041e3..d565c23a1 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 9fd379703..20df58d8f 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 1612c76d3..df956f4f5 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 c9736d5ef..a361f7039 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 f42ea3181..ccb2b4c78 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 15f5b1229..08386f622 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 16322e4f8..268eab5f6 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 c066bb32a..107d956fb 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 e5d6b8a23..a6b755cb0 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 61e5e1b82..6e923f674 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 7d7bca483..bd863a17c 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 0a97975ca..77e859be5 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 8310b4b62..d38b7c088 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 84e572347..ce7f44c17 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 377cf76ac..00fdee102 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 8319fb25a..1681a9b39 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 945014673..844c15427 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 851b61e93..d89bbee60 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 d83416fd9..33bf0868a 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 467770d3e..d3f354f6e 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 4ca949e76..be20208c3 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 4706fe8b4..8d97e08ed 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 df6aa9467..fce3e4c7c 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 abedecdb4..805418e75 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 86b0fe78c..7f4cf2614 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 f73f55e5f..3d90978bb 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 5702b773a..69f1edbf1 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;