aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-05 00:50:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-05 00:50:29 +0000
commit624bfdfc96b37df2316f6dd5241f763671259959 (patch)
tree4227b78311bce68aec20a89080a936e21c8013f9 /paludis/repositories
parente931fb60ebe5fec2effef02435aad25f9d054845 (diff)
downloadpaludis-624bfdfc96b37df2316f6dd5241f763671259959.tar.gz
paludis-624bfdfc96b37df2316f6dd5241f763671259959.tar.xz
r3770@snowflake: ciaranm | 2007-07-05 01:48:14 +0100
Collection -> Sequence, Set, Map. Fixes: ticket:241
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_key.cc38
-rw-r--r--paludis/repositories/e/e_key.hh16
-rw-r--r--paludis/repositories/e/e_repository.cc57
-rw-r--r--paludis/repositories/e/e_repository.hh16
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc73
-rw-r--r--paludis/repositories/e/e_repository_news.cc5
-rw-r--r--paludis/repositories/e/e_repository_params.hh1
-rw-r--r--paludis/repositories/e/e_repository_params.sr4
-rw-r--r--paludis/repositories/e/e_repository_profile.cc10
-rw-r--r--paludis/repositories/e/e_repository_profile.hh2
-rw-r--r--paludis/repositories/e/e_repository_profile_file.cc1
-rw-r--r--paludis/repositories/e/e_repository_sets.cc14
-rw-r--r--paludis/repositories/e/e_repository_sets.hh2
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc21
-rw-r--r--paludis/repositories/e/ebin.cc9
-rw-r--r--paludis/repositories/e/ebin.hh1
-rw-r--r--paludis/repositories/e/ebuild.cc33
-rw-r--r--paludis/repositories/e/ebuild.hh6
-rw-r--r--paludis/repositories/e/ebuild.sr16
-rw-r--r--paludis/repositories/e/ebuild_entries.cc44
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache.cc1
-rw-r--r--paludis/repositories/e/ebuild_id.cc10
-rw-r--r--paludis/repositories/e/ebuild_id.hh8
-rw-r--r--paludis/repositories/e/eclass_mtimes.cc10
-rw-r--r--paludis/repositories/e/eclass_mtimes.hh6
-rw-r--r--paludis/repositories/e/exheres_layout.cc54
-rw-r--r--paludis/repositories/e/exheres_layout.hh16
-rw-r--r--paludis/repositories/e/glsa.hh1
-rw-r--r--paludis/repositories/e/layout.cc1
-rw-r--r--paludis/repositories/e/layout.hh16
-rw-r--r--paludis/repositories/e/make_ebin_repository.cc15
-rw-r--r--paludis/repositories/e/make_ebin_repository.hh5
-rw-r--r--paludis/repositories/e/make_ebuild_repository.cc15
-rw-r--r--paludis/repositories/e/make_ebuild_repository.hh5
-rw-r--r--paludis/repositories/e/qa/qa_controller.cc5
-rw-r--r--paludis/repositories/e/registration.cc3
-rw-r--r--paludis/repositories/e/traditional_layout.cc54
-rw-r--r--paludis/repositories/e/traditional_layout.hh16
-rw-r--r--paludis/repositories/e/vdb_id.cc16
-rw-r--r--paludis/repositories/e/vdb_id.hh8
-rw-r--r--paludis/repositories/e/vdb_merger.cc4
-rw-r--r--paludis/repositories/e/vdb_repository.cc74
-rw-r--r--paludis/repositories/e/vdb_repository.hh19
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc3
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc13
-rw-r--r--paludis/repositories/fake/fake_package_id.cc62
-rw-r--r--paludis/repositories/fake/fake_package_id.hh36
-rw-r--r--paludis/repositories/fake/fake_repository.cc4
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc45
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh14
-rw-r--r--paludis/repositories/repository_maker.cc3
-rw-r--r--paludis/repositories/repository_maker.hh3
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc22
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh8
-rw-r--r--paludis/repositories/virtuals/package_id.cc16
-rw-r--r--paludis/repositories/virtuals/package_id.hh8
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc22
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh7
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc1
59 files changed, 522 insertions, 476 deletions
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 381ba7614..9a6edcf6a 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -22,12 +22,12 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
#include <paludis/util/mutex.hh>
+#include <paludis/util/set.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/eapi.hh>
@@ -294,7 +294,7 @@ namespace paludis
const tr1::shared_ptr<const PackageID> id;
const std::string string_value;
mutable Mutex value_mutex;
- mutable tr1::shared_ptr<IUseFlagCollection> value;
+ mutable tr1::shared_ptr<IUseFlagSet> value;
Implementation(const tr1::shared_ptr<const PackageID> & i, const std::string & v) :
id(i),
@@ -306,7 +306,7 @@ namespace paludis
EIUseKey::EIUseKey(const tr1::shared_ptr<const PackageID> & id,
const std::string & r, const std::string & h, const std::string & v, const MetadataKeyType t) :
- MetadataCollectionKey<IUseFlagCollection>(r, h, t),
+ MetadataSetKey<IUseFlagSet>(r, h, t),
PrivateImplementationPattern<EIUseKey>(new Implementation<EIUseKey>(id, v)),
_imp(PrivateImplementationPattern<EIUseKey>::_imp.get())
{
@@ -316,7 +316,7 @@ EIUseKey::~EIUseKey()
{
}
-const tr1::shared_ptr<const IUseFlagCollection>
+const tr1::shared_ptr<const IUseFlagSet>
EIUseKey::value() const
{
Lock l(_imp->value_mutex);
@@ -324,7 +324,7 @@ EIUseKey::value() const
return _imp->value;
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
- _imp->value.reset(new IUseFlagCollection::Concrete);
+ _imp->value.reset(new IUseFlagSet);
std::list<std::string> tokens;
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
@@ -341,7 +341,7 @@ EIUseKey::idle_load() const
if (l() && ! _imp->value)
{
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "' as idle action:");
- _imp->value.reset(new IUseFlagCollection::Concrete);
+ _imp->value.reset(new IUseFlagSet);
std::list<std::string> tokens;
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
@@ -358,7 +358,7 @@ namespace paludis
const tr1::shared_ptr<const PackageID> id;
const std::string string_value;
mutable Mutex value_mutex;
- mutable tr1::shared_ptr<KeywordNameCollection> value;
+ mutable tr1::shared_ptr<KeywordNameSet> value;
Implementation(const tr1::shared_ptr<const PackageID> & i, const std::string & v) :
id(i),
@@ -370,7 +370,7 @@ namespace paludis
EKeywordsKey::EKeywordsKey(const tr1::shared_ptr<const PackageID> & id,
const std::string & r, const std::string & h, const std::string & v, const MetadataKeyType t) :
- MetadataCollectionKey<KeywordNameCollection>(r, h, t),
+ MetadataSetKey<KeywordNameSet>(r, h, t),
PrivateImplementationPattern<EKeywordsKey>(new Implementation<EKeywordsKey>(id, v)),
_imp(PrivateImplementationPattern<EKeywordsKey>::_imp.get())
{
@@ -380,14 +380,14 @@ EKeywordsKey::~EKeywordsKey()
{
}
-const tr1::shared_ptr<const KeywordNameCollection>
+const tr1::shared_ptr<const KeywordNameSet>
EKeywordsKey::value() const
{
Lock l(_imp->value_mutex);
if (_imp->value)
return _imp->value;
- _imp->value.reset(new KeywordNameCollection::Concrete);
+ _imp->value.reset(new KeywordNameSet);
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, create_inserter<KeywordName>(_imp->value->inserter()));
return _imp->value;
@@ -399,7 +399,7 @@ EKeywordsKey::idle_load() const
TryLock l(_imp->value_mutex);
if (l() && ! _imp->value)
{
- _imp->value.reset(new KeywordNameCollection::Concrete);
+ _imp->value.reset(new KeywordNameSet);
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "' as idle action:");
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, create_inserter<KeywordName>(_imp->value->inserter()));
}
@@ -412,7 +412,7 @@ namespace paludis
{
const tr1::shared_ptr<const PackageID> id;
const std::string string_value;
- mutable tr1::shared_ptr<UseFlagNameCollection> value;
+ mutable tr1::shared_ptr<UseFlagNameSet> value;
Implementation(const tr1::shared_ptr<const PackageID> & i, const std::string & v) :
id(i),
@@ -424,7 +424,7 @@ namespace paludis
EUseKey::EUseKey(const tr1::shared_ptr<const PackageID> & id,
const std::string & r, const std::string & h, const std::string & v, const MetadataKeyType t) :
- MetadataCollectionKey<UseFlagNameCollection>(r, h, t),
+ MetadataSetKey<UseFlagNameSet>(r, h, t),
PrivateImplementationPattern<EUseKey>(new Implementation<EUseKey>(id, v)),
_imp(PrivateImplementationPattern<EUseKey>::_imp.get())
{
@@ -434,13 +434,13 @@ EUseKey::~EUseKey()
{
}
-const tr1::shared_ptr<const UseFlagNameCollection>
+const tr1::shared_ptr<const UseFlagNameSet>
EUseKey::value() const
{
if (_imp->value)
return _imp->value;
- _imp->value.reset(new UseFlagNameCollection::Concrete);
+ _imp->value.reset(new UseFlagNameSet);
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
std::list<std::string> tokens;
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, std::back_inserter(tokens));
@@ -458,7 +458,7 @@ namespace paludis
{
const tr1::shared_ptr<const PackageID> id;
const std::string string_value;
- mutable tr1::shared_ptr<InheritedCollection> value;
+ mutable tr1::shared_ptr<InheritedSet> value;
Implementation(const tr1::shared_ptr<const PackageID> & i, const std::string & v) :
id(i),
@@ -470,7 +470,7 @@ namespace paludis
EInheritedKey::EInheritedKey(const tr1::shared_ptr<const PackageID> & id,
const std::string & r, const std::string & h, const std::string & v, const MetadataKeyType t) :
- MetadataCollectionKey<InheritedCollection>(r, h, t),
+ MetadataSetKey<InheritedSet>(r, h, t),
PrivateImplementationPattern<EInheritedKey>(new Implementation<EInheritedKey>(id, v)),
_imp(PrivateImplementationPattern<EInheritedKey>::_imp.get())
{
@@ -480,13 +480,13 @@ EInheritedKey::~EInheritedKey()
{
}
-const tr1::shared_ptr<const InheritedCollection>
+const tr1::shared_ptr<const InheritedSet>
EInheritedKey::value() const
{
if (_imp->value)
return _imp->value;
- _imp->value.reset(new InheritedCollection::Concrete);
+ _imp->value.reset(new InheritedSet);
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, _imp->value->inserter());
return _imp->value;
diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh
index f839aeb81..c3b9fa204 100644
--- a/paludis/repositories/e/e_key.hh
+++ b/paludis/repositories/e/e_key.hh
@@ -129,7 +129,7 @@ namespace paludis
};
class EIUseKey :
- public MetadataCollectionKey<IUseFlagCollection>,
+ public MetadataSetKey<IUseFlagSet>,
private PrivateImplementationPattern<EIUseKey>
{
private:
@@ -140,14 +140,14 @@ namespace paludis
const std::string &, const std::string &, const std::string &, const MetadataKeyType);
~EIUseKey();
- const tr1::shared_ptr<const IUseFlagCollection> value() const
+ const tr1::shared_ptr<const IUseFlagSet> value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
void idle_load() const;
};
class EKeywordsKey :
- public MetadataCollectionKey<KeywordNameCollection>,
+ public MetadataSetKey<KeywordNameSet>,
private PrivateImplementationPattern<EKeywordsKey>
{
private:
@@ -158,14 +158,14 @@ namespace paludis
const std::string &, const std::string &, const std::string &, const MetadataKeyType);
~EKeywordsKey();
- const tr1::shared_ptr<const KeywordNameCollection> value() const
+ const tr1::shared_ptr<const KeywordNameSet> value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
void idle_load() const;
};
class EUseKey :
- public MetadataCollectionKey<UseFlagNameCollection>,
+ public MetadataSetKey<UseFlagNameSet>,
private PrivateImplementationPattern<EUseKey>
{
private:
@@ -176,12 +176,12 @@ namespace paludis
const std::string &, const std::string &, const std::string &, const MetadataKeyType);
~EUseKey();
- const tr1::shared_ptr<const UseFlagNameCollection> value() const
+ const tr1::shared_ptr<const UseFlagNameSet> value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
class EInheritedKey :
- public MetadataCollectionKey<InheritedCollection>,
+ public MetadataSetKey<InheritedSet>,
private PrivateImplementationPattern<EInheritedKey>
{
private:
@@ -192,7 +192,7 @@ namespace paludis
const std::string &, const std::string &, const std::string &, const MetadataKeyType);
~EInheritedKey();
- const tr1::shared_ptr<const InheritedCollection> value() const
+ const tr1::shared_ptr<const InheritedSet> value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 2127abe13..a980cc0be 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -46,7 +46,6 @@
#include <paludis/syncer.hh>
#include <paludis/eapi.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
@@ -55,15 +54,19 @@
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/set.hh>
#include <paludis/util/tr1_functional.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <map>
+#include <set>
#include <functional>
#include <algorithm>
#include <vector>
+#include <list>
#include <strings.h>
#include <ctype.h>
@@ -102,7 +105,7 @@ namespace paludis
mutable VirtualsMap our_virtuals;
const std::map<QualifiedPackageName, QualifiedPackageName> provide_map;
- mutable tr1::shared_ptr<UseFlagNameCollection> arch_flags;
+ mutable tr1::shared_ptr<UseFlagNameSet> arch_flags;
mutable bool has_mirrors;
mutable MirrorMap mirrors;
@@ -166,8 +169,8 @@ namespace paludis
Context context("When loading profiles.desc:");
bool found_one(false);
- tr1::shared_ptr<const FSEntryCollection> profiles_desc_files(layout->profiles_desc_files());
- for (FSEntryCollection::Iterator p(profiles_desc_files->begin()), p_end(profiles_desc_files->end()) ;
+ 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()) ;
p != p_end ; ++p)
{
if (! p->exists())
@@ -184,7 +187,7 @@ namespace paludis
if (tokens.size() < 3)
continue;
- FSEntryCollection::Concrete profiles;
+ FSEntrySequence profiles;
profiles.push_back(layout->profiles_base_dir() / tokens.at(1));
profiles_desc.push_back(RepositoryEInterface::ProfilesDescLine::create()
.arch(tokens.at(0))
@@ -320,13 +323,13 @@ ERepository::do_has_package_named(const QualifiedPackageName & q) const
return _imp->layout->has_package_named(q);
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
ERepository::do_category_names() const
{
return _imp->layout->category_names();
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
ERepository::do_package_names(const CategoryNamePart & c) const
{
return _imp->layout->package_names(c);
@@ -345,8 +348,8 @@ ERepository::do_query_repository_masks(const PackageID & id) const
{
Context context("When querying repository mask for '" + stringify(id) + "':");
- tr1::shared_ptr<const FSEntryCollection> repository_mask_files(_imp->layout->repository_mask_files());
- for (FSEntryCollection::Iterator p(repository_mask_files->begin()), p_end(repository_mask_files->end()) ;
+ 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()) ;
p != p_end ; ++p)
{
Context context_local("When reading '" + stringify(*p) + "':");
@@ -421,17 +424,17 @@ ERepository::do_query_use_force(const UseFlagName & u, const PackageID & e) cons
return _imp->profile_ptr->use_forced(u, e);
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
ERepository::do_arch_flags() const
{
if (! _imp->arch_flags)
{
Context context("When loading arch list:");
- _imp->arch_flags.reset(new UseFlagNameCollection::Concrete);
+ _imp->arch_flags.reset(new UseFlagNameSet);
bool found_one(false);
- tr1::shared_ptr<const FSEntryCollection> arch_list_files(_imp->layout->arch_list_files());
- for (FSEntryCollection::Iterator p(arch_list_files->begin()), p_end(arch_list_files->end()) ;
+ 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()) ;
p != p_end ; ++p)
{
if (! p->exists())
@@ -477,8 +480,8 @@ ERepository::need_mirrors() const
if (! _imp->has_mirrors)
{
bool found_one(false);
- tr1::shared_ptr<const FSEntryCollection> mirror_files(_imp->layout->mirror_files());
- for (FSEntryCollection::Iterator p(mirror_files->begin()), p_end(mirror_files->end()) ;
+ tr1::shared_ptr<const FSEntrySequence> mirror_files(_imp->layout->mirror_files());
+ for (FSEntrySequence::Iterator p(mirror_files->begin()), p_end(mirror_files->end()) ;
p != p_end ; ++p)
{
if (p->exists())
@@ -542,7 +545,7 @@ ERepository::do_package_set(const SetName & s) const
return _imp->sets_ptr->package_set(s);
}
-tr1::shared_ptr<const SetNameCollection>
+tr1::shared_ptr<const SetNameSet>
ERepository::sets_list() const
{
return _imp->sets_ptr->sets_list();
@@ -730,7 +733,7 @@ ERepository::virtual_packages() const
_imp->need_profiles();
- tr1::shared_ptr<VirtualsSequence> result(new VirtualsSequence::Concrete);
+ tr1::shared_ptr<VirtualsSequence> result(new VirtualsSequence);
for (ERepositoryProfile::VirtualsIterator i(_imp->profile_ptr->begin_virtuals()),
i_end(_imp->profile_ptr->end_virtuals()) ; i != i_end ; ++i)
@@ -741,12 +744,12 @@ ERepository::virtual_packages() const
return result;
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
ERepository::do_use_expand_flags() const
{
_imp->need_profiles();
- tr1::shared_ptr<UseFlagNameCollection> result(new UseFlagNameCollection::Concrete);
+ tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet);
for (ERepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand()),
i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i)
{
@@ -765,12 +768,12 @@ ERepository::do_use_expand_flags() const
return result;
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
ERepository::do_use_expand_prefixes() const
{
_imp->need_profiles();
- tr1::shared_ptr<UseFlagNameCollection> result(new UseFlagNameCollection::Concrete);
+ tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet);
for (ERepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand()),
i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i)
{
@@ -782,12 +785,12 @@ ERepository::do_use_expand_prefixes() const
return result;
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
ERepository::do_use_expand_hidden_prefixes() const
{
_imp->need_profiles();
- tr1::shared_ptr<UseFlagNameCollection> result(new UseFlagNameCollection::Concrete);
+ tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet);
for (ERepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand_hidden()),
i_end(_imp->profile_ptr->end_use_expand_hidden()) ; i != i_end ; ++i)
{
@@ -805,13 +808,13 @@ ERepository::regenerate_cache() const
_imp->names_cache->regenerate_cache();
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
ERepository::do_category_names_containing_package(const PackageNamePart & p) const
{
if (! _imp->names_cache->usable())
return Repository::do_category_names_containing_package(p);
- tr1::shared_ptr<const CategoryNamePartCollection> result(
+ tr1::shared_ptr<const CategoryNamePartSet> result(
_imp->names_cache->category_names_containing_package(p));
return result ? result : Repository::do_category_names_containing_package(p);
@@ -883,8 +886,8 @@ ERepository::do_describe_use_flag(const UseFlagName & f,
{
if (_imp->use_desc.empty())
{
- tr1::shared_ptr<const FSEntryCollection> use_desc_dirs(_imp->layout->use_desc_dirs());
- for (FSEntryCollection::Iterator p(use_desc_dirs->begin()), p_end(use_desc_dirs->end()) ;
+ 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()) ;
p != p_end ; ++p)
_imp->use_desc.push_back(tr1::shared_ptr<UseDesc>(new UseDesc(*p)));
}
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 990559c62..b911c0324 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -80,7 +80,7 @@ namespace paludis
virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const;
- virtual tr1::shared_ptr<const SetNameCollection> sets_list() const;
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const;
/* RepositorySyncableInterface */
@@ -105,16 +105,16 @@ namespace paludis
virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_arch_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_hidden_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string do_describe_use_flag(const UseFlagName &,
@@ -143,14 +143,14 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names_containing_package(
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
const PackageNamePart &) const;
virtual bool do_has_package_named(const QualifiedPackageName &) const
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 56dd330d2..62bf3ae59 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -19,11 +19,12 @@
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/repositories/e/make_ebuild_repository.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/set.hh>
#include <paludis/eapi.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
@@ -55,8 +56,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo1");
@@ -78,8 +79,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo2");
@@ -101,8 +102,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo3");
@@ -124,8 +125,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo1");
@@ -156,8 +157,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo1");
@@ -169,7 +170,7 @@ namespace test_cases
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- tr1::shared_ptr<const CategoryNamePartCollection> c(repo->category_names());
+ tr1::shared_ptr<const CategoryNamePartSet> c(repo->category_names());
TEST_CHECK(c->end() != c->find(CategoryNamePart("cat-one")));
TEST_CHECK(c->end() != c->find(CategoryNamePart("cat-two")));
TEST_CHECK(c->end() != c->find(CategoryNamePart("cat-three")));
@@ -190,8 +191,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo4");
@@ -230,8 +231,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo4");
@@ -274,8 +275,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo4");
@@ -283,7 +284,7 @@ namespace test_cases
tr1::shared_ptr<ERepository> repo(make_ebuild_repository(
&env, keys));
- tr1::shared_ptr<const QualifiedPackageNameCollection> names;
+ tr1::shared_ptr<const QualifiedPackageNameSet> names;
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -327,8 +328,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo5");
@@ -336,7 +337,7 @@ namespace test_cases
tr1::shared_ptr<ERepository> repo(make_ebuild_repository(
&env, keys));
- tr1::shared_ptr<const QualifiedPackageNameCollection> names;
+ tr1::shared_ptr<const QualifiedPackageNameSet> names;
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -359,8 +360,8 @@ namespace test_cases
using namespace tr1::placeholders;
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo4");
@@ -407,8 +408,8 @@ namespace test_cases
using namespace tr1::placeholders;
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo8");
@@ -453,8 +454,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo6");
@@ -494,8 +495,8 @@ namespace test_cases
TestMessageSuffix opass_suffix("opass=" + stringify(opass), true);
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("write_cache", "e_repository_TEST_dir/repo7/metadata/cache");
@@ -560,8 +561,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo7");
@@ -594,8 +595,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo9");
@@ -638,8 +639,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_TEST_dir/repo10");
diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc
index c0ab37508..6b56df86d 100644
--- a/paludis/repositories/e/e_repository_news.cc
+++ b/paludis/repositories/e/e_repository_news.cc
@@ -27,6 +27,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/query.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -148,8 +149,8 @@ ERepositoryNews::update_news() const
if (news.begin_display_if_profile() != news.end_display_if_profile())
{
bool local_show(false);
- tr1::shared_ptr<const FSEntryCollection> c(_imp->params.profiles);
- for (FSEntryCollection::Iterator p(c->begin()), p_end(c->end()) ; p != p_end ; ++p)
+ tr1::shared_ptr<const FSEntrySequence> c(_imp->params.profiles);
+ for (FSEntrySequence::Iterator 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()),
diff --git a/paludis/repositories/e/e_repository_params.hh b/paludis/repositories/e/e_repository_params.hh
index 8d2db4139..02c115762 100644
--- a/paludis/repositories/e/e_repository_params.hh
+++ b/paludis/repositories/e/e_repository_params.hh
@@ -21,7 +21,6 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_E_REPOSITORY_PARAMS_HH 1
#include <paludis/util/fs_entry.hh>
-#include <paludis/util/collection.hh>
#include <paludis/util/sr.hh>
/** \file
diff --git a/paludis/repositories/e/e_repository_params.sr b/paludis/repositories/e/e_repository_params.sr
index b1fd33a01..aefcaf077 100644
--- a/paludis/repositories/e/e_repository_params.sr
+++ b/paludis/repositories/e/e_repository_params.sr
@@ -9,12 +9,12 @@ make_class_ERepositoryParams()
key layout std::string
key environment "Environment *"
key location FSEntry
- key profiles "tr1::shared_ptr<const FSEntryCollection>"
+ key profiles "tr1::shared_ptr<const FSEntrySequence>"
key cache FSEntry
key write_cache FSEntry
key names_cache FSEntry
key distdir FSEntry
- key eclassdirs "tr1::shared_ptr<const FSEntryCollection>"
+ key eclassdirs "tr1::shared_ptr<const FSEntrySequence>"
key setsdir FSEntry
key securitydir FSEntry
key newsdir FSEntry
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index 007504c60..135f1fb50 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -28,6 +28,8 @@
#include <paludis/util/save.hh>
#include <paludis/util/system.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/set.hh>
#include <paludis/config_file.hh>
#include <paludis/dep_tag.hh>
#include <paludis/environment.hh>
@@ -162,7 +164,7 @@ namespace paludis
///\{
Implementation(const Environment * const e, const ERepository * const p,
- const RepositoryName & name, const FSEntryCollection & dirs,
+ const RepositoryName & name, const FSEntrySequence & dirs,
bool arch_is_special) :
env(e),
repository(p),
@@ -172,7 +174,7 @@ namespace paludis
{
load_environment();
- for (FSEntryCollection::Iterator d(dirs.begin()), d_end(dirs.end()) ;
+ for (FSEntrySequence::Iterator d(dirs.begin()), d_end(dirs.end()) ;
d != d_end ; ++d)
load_profile_directory_recursively(*d);
@@ -586,7 +588,7 @@ Implementation<ERepositoryProfile>::handle_profile_arch_var()
ERepositoryProfile::ERepositoryProfile(
const Environment * const env, const ERepository * const p, const RepositoryName & name,
- const FSEntryCollection & location,
+ const FSEntrySequence & location,
bool arch_is_special) :
PrivateImplementationPattern<ERepositoryProfile>(
new Implementation<ERepositoryProfile>(env, p, name, location, arch_is_special))
@@ -677,7 +679,7 @@ ERepositoryProfile::use_state_ignoring_masks(const UseFlagName & u,
{
if (e.iuse_key())
{
- IUseFlagCollection::Iterator i(e.iuse_key()->value()->find(IUseFlag(u, use_unspecified)));
+ IUseFlagSet::Iterator i(e.iuse_key()->value()->find(IUseFlag(u, use_unspecified)));
if (i != e.iuse_key()->value()->end())
result = i->state;
}
diff --git a/paludis/repositories/e/e_repository_profile.hh b/paludis/repositories/e/e_repository_profile.hh
index 165400aa7..fa69b6b03 100644
--- a/paludis/repositories/e/e_repository_profile.hh
+++ b/paludis/repositories/e/e_repository_profile.hh
@@ -60,7 +60,7 @@ namespace paludis
ERepositoryProfile(const Environment * const env,
const ERepository * const,
const RepositoryName & name,
- const FSEntryCollection & location,
+ const FSEntrySequence & location,
bool arch_is_special);
~ERepositoryProfile();
diff --git a/paludis/repositories/e/e_repository_profile_file.cc b/paludis/repositories/e/e_repository_profile_file.cc
index 071d9383a..16de69375 100644
--- a/paludis/repositories/e/e_repository_profile_file.cc
+++ b/paludis/repositories/e/e_repository_profile_file.cc
@@ -22,6 +22,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/config_file.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/options.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <list>
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 35db9d5ae..a26da7508 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -30,7 +30,6 @@
#include <paludis/version_operator.hh>
#include <paludis/version_requirements.hh>
#include <paludis/portage_dep_parser.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/is_file_with_extension.hh>
@@ -38,9 +37,12 @@
#include <paludis/util/strip.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/tr1_functional.hh>
#include <list>
-#include <paludis/util/tr1_functional.hh>
+#include <map>
#include <set>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -115,12 +117,12 @@ ERepositorySets::package_set(const SetName & s) const
return tr1::shared_ptr<SetSpecTree::ConstItem>();
}
-tr1::shared_ptr<const SetNameCollection>
+tr1::shared_ptr<const SetNameSet>
ERepositorySets::sets_list() const
{
Context context("While generating the list of sets:");
- tr1::shared_ptr<SetNameCollection> result(new SetNameCollection::Concrete);
+ tr1::shared_ptr<SetNameSet> result(new SetNameSet);
result->insert(SetName("insecurity"));
result->insert(SetName("security"));
result->insert(SetName("system"));
@@ -263,7 +265,7 @@ ERepositorySets::security_set(bool insecurity) const
if (insecurity)
{
- tr1::shared_ptr<VersionRequirements> v(new VersionRequirements::Concrete);
+ tr1::shared_ptr<VersionRequirements> v(new VersionRequirements);
v->push_back(VersionRequirement(vo_equal, (*c)->version()));
tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName((*c)->name())),
@@ -307,7 +309,7 @@ ERepositorySets::security_set(bool insecurity) const
continue;
}
- tr1::shared_ptr<VersionRequirements> v(new VersionRequirements::Concrete);
+ tr1::shared_ptr<VersionRequirements> v(new VersionRequirements);
v->push_back(VersionRequirement(vo_equal, (*r)->version()));
tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName((*r)->name())),
diff --git a/paludis/repositories/e/e_repository_sets.hh b/paludis/repositories/e/e_repository_sets.hh
index e5c9fbd5e..2d8a449fb 100644
--- a/paludis/repositories/e/e_repository_sets.hh
+++ b/paludis/repositories/e/e_repository_sets.hh
@@ -68,7 +68,7 @@ namespace paludis
/**
* Give a list of all the sets in this repo.
*/
- tr1::shared_ptr<const SetNameCollection> sets_list() const;
+ tr1::shared_ptr<const SetNameSet> sets_list() const;
};
}
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index 557b8f037..9355de584 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -21,10 +21,11 @@
#include <paludis/repositories/e/make_ebuild_repository.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/dep_spec_pretty_printer.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/set.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -52,8 +53,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_sets_TEST_dir/repo1");
@@ -61,7 +62,7 @@ namespace test_cases
tr1::shared_ptr<ERepository> repo(make_ebuild_repository(
&env, keys));
- tr1::shared_ptr<const SetNameCollection> sets_list(repo->sets_interface->sets_list());
+ tr1::shared_ptr<const SetNameSet> sets_list(repo->sets_interface->sets_list());
TEST_CHECK_EQUAL(sets_list->size(), 4U);
TEST_CHECK(sets_list->end() != sets_list->find(SetName("system")));
TEST_CHECK(sets_list->end() != sets_list->find(SetName("security")));
@@ -81,8 +82,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_sets_TEST_dir/repo1");
@@ -118,8 +119,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_sets_TEST_dir/repo1");
@@ -153,8 +154,8 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(
+ new Map<std::string, std::string>);
keys->insert("format", "ebuild");
keys->insert("names_cache", "/var/empty");
keys->insert("location", "e_repository_sets_TEST_dir/repo1");
diff --git a/paludis/repositories/e/ebin.cc b/paludis/repositories/e/ebin.cc
index 488356645..2c1479c39 100644
--- a/paludis/repositories/e/ebin.cc
+++ b/paludis/repositories/e/ebin.cc
@@ -23,6 +23,7 @@
#include <paludis/util/system.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/eapi.hh>
#include <paludis/about.hh>
#include <paludis/package_id.hh>
@@ -74,10 +75,10 @@ EbinCommand::operator() ()
if (use_sandbox())
cmd.with_sandbox();
- tr1::shared_ptr<const FSEntryCollection> syncers_dirs(params.environment->syncers_dirs());
- tr1::shared_ptr<const FSEntryCollection> bashrc_files(params.environment->bashrc_files());
- tr1::shared_ptr<const FSEntryCollection> fetchers_dirs(params.environment->fetchers_dirs());
- tr1::shared_ptr<const FSEntryCollection> hook_dirs(params.environment->hook_dirs());
+ tr1::shared_ptr<const FSEntrySequence> syncers_dirs(params.environment->syncers_dirs());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(params.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> fetchers_dirs(params.environment->fetchers_dirs());
+ tr1::shared_ptr<const FSEntrySequence> hook_dirs(params.environment->hook_dirs());
cmd = extend_command(cmd
.with_setenv("P", stringify(params.package_id->name().package) + "-" +
diff --git a/paludis/repositories/e/ebin.hh b/paludis/repositories/e/ebin.hh
index 8247d56cc..7bd658be3 100644
--- a/paludis/repositories/e/ebin.hh
+++ b/paludis/repositories/e/ebin.hh
@@ -23,7 +23,6 @@
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/attributes.hh>
-#include <paludis/util/collection.hh>
#include <paludis/package_database.hh>
#include <string>
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index effc21fbe..183087933 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -25,7 +25,8 @@
#include <paludis/util/strip.hh>
#include <paludis/util/pstream.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/collection_concrete.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/map.hh>
#include <paludis/about.hh>
#include <paludis/environment.hh>
@@ -89,10 +90,10 @@ EbuildCommand::operator() ()
cmd.with_uid_gid(params.environment->reduced_uid(), params.environment->reduced_gid());
- tr1::shared_ptr<const FSEntryCollection> syncers_dirs(params.environment->syncers_dirs());
- tr1::shared_ptr<const FSEntryCollection> bashrc_files(params.environment->bashrc_files());
- tr1::shared_ptr<const FSEntryCollection> fetchers_dirs(params.environment->fetchers_dirs());
- tr1::shared_ptr<const FSEntryCollection> hook_dirs(params.environment->hook_dirs());
+ tr1::shared_ptr<const FSEntrySequence> syncers_dirs(params.environment->syncers_dirs());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(params.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> fetchers_dirs(params.environment->fetchers_dirs());
+ tr1::shared_ptr<const FSEntrySequence> hook_dirs(params.environment->hook_dirs());
cmd = extend_command(cmd
.with_setenv("P", stringify(params.package_id->name().package) + "-" +
@@ -236,7 +237,7 @@ bool
EbuildMetadataCommand::do_run_command(const Command & cmd)
{
bool ok(false);
- keys.reset(new AssociativeCollection<std::string, std::string>::Concrete);
+ keys.reset(new Map<std::string, std::string>);
try
{
@@ -264,7 +265,7 @@ EbuildMetadataCommand::do_run_command(const Command & cmd)
{
Log::get_instance()->message(ll_warning, lc_context) << "Could not generate cache for '"
<< *params.package_id << "'";
- keys.reset(new AssociativeCollection<std::string, std::string>::Concrete);
+ keys.reset(new Map<std::string, std::string>);
keys->insert("EAPI", EAPIData::get_instance()->unknown_eapi()->name);
keys->insert("SLOT", "UNKNOWN");
@@ -274,9 +275,9 @@ EbuildMetadataCommand::do_run_command(const Command & cmd)
namespace
{
- std::string get(const tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > & k, const std::string & s)
+ std::string get(const tr1::shared_ptr<const Map<std::string, std::string> > & k, const std::string & s)
{
- AssociativeCollection<std::string, std::string>::Iterator i(k->find(s));
+ Map<std::string, std::string>::Iterator i(k->find(s));
if (k->end() == i)
return "";
return i->second;
@@ -438,7 +439,7 @@ EbuildFetchCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIRS", join(fetch_params.profiles->begin(),
fetch_params.profiles->end(), " ")));
- for (AssociativeCollection<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::Iterator
i(fetch_params.expand_vars->begin()),
j(fetch_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
@@ -507,7 +508,7 @@ EbuildInstallCommand::extend_command(const Command & cmd)
install_params.profiles->end(), " "))
.with_setenv("SLOT", stringify(install_params.slot)));
- for (AssociativeCollection<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::Iterator
i(install_params.expand_vars->begin()),
j(install_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
@@ -611,10 +612,10 @@ WriteVDBEntryCommand::operator() ()
stringify(params.output_directory) + "' '" +
stringify(params.environment_file) + "'");
- tr1::shared_ptr<const FSEntryCollection> syncers_dirs(params.environment->syncers_dirs());
- tr1::shared_ptr<const FSEntryCollection> bashrc_files(params.environment->bashrc_files());
- tr1::shared_ptr<const FSEntryCollection> fetchers_dirs(params.environment->fetchers_dirs());
- tr1::shared_ptr<const FSEntryCollection> hook_dirs(params.environment->hook_dirs());
+ tr1::shared_ptr<const FSEntrySequence> syncers_dirs(params.environment->syncers_dirs());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(params.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> fetchers_dirs(params.environment->fetchers_dirs());
+ tr1::shared_ptr<const FSEntrySequence> hook_dirs(params.environment->hook_dirs());
Command cmd(Command(ebuild_cmd)
.with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." +
@@ -686,7 +687,7 @@ EbuildPretendCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIRS", join(pretend_params.profiles->begin(),
pretend_params.profiles->end(), " ")));
- for (AssociativeCollection<std::string, std::string>::Iterator
+ for (Map<std::string, std::string>::Iterator
i(pretend_params.expand_vars->begin()),
j(pretend_params.expand_vars->end()) ; i != j ; ++i)
result.with_setenv(i->first, i->second);
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index 471a93425..e326d2085 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -21,9 +21,9 @@
#define PALUDIS_GUARD_PALUDIS_EBUILD_HH 1
#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/fs_entry.hh>
+#include <paludis/util/fs_entry-fwd.hh>
#include <paludis/util/attributes.hh>
-#include <paludis/util/collection.hh>
+#include <paludis/util/map-fwd.hh>
#include <paludis/package_database.hh>
#include <string>
@@ -343,7 +343,7 @@ namespace paludis
public EbuildCommand
{
private:
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys;
+ tr1::shared_ptr<Map<std::string, std::string> > keys;
public:
EbuildMetadataCommand(const EbuildCommandParams &);
diff --git a/paludis/repositories/e/ebuild.sr b/paludis/repositories/e/ebuild.sr
index 48cde63da..a87cae4cf 100644
--- a/paludis/repositories/e/ebuild.sr
+++ b/paludis/repositories/e/ebuild.sr
@@ -8,8 +8,8 @@ make_class_EbuildCommandParams()
key ebuild_dir FSEntry
key ebuild_file FSEntry
key files_dir FSEntry
- key eclassdirs "tr1::shared_ptr<const FSEntryCollection>"
- key exlibsdirs "tr1::shared_ptr<const FSEntryCollection>"
+ key eclassdirs "tr1::shared_ptr<const FSEntrySequence>"
+ key exlibsdirs "tr1::shared_ptr<const FSEntrySequence>"
key portdir FSEntry
key distdir FSEntry
key buildroot FSEntry
@@ -38,8 +38,8 @@ make_class_EbuildFetchCommandParams()
key use_expand std::string
key flat_src_uri std::string
key root std::string
- key profiles "tr1::shared_ptr<const FSEntryCollection>"
- key expand_vars "tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >"
+ key profiles "tr1::shared_ptr<const FSEntrySequence>"
+ key expand_vars "tr1::shared_ptr<const Map<std::string, std::string> >"
key safe_resume bool
doxygen_comment << "END"
@@ -62,8 +62,8 @@ make_class_EbuildInstallCommandParams()
key use std::string
key use_expand std::string
key root std::string
- key profiles "tr1::shared_ptr<const FSEntryCollection>"
- key expand_vars "tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >"
+ key profiles "tr1::shared_ptr<const FSEntrySequence>"
+ key expand_vars "tr1::shared_ptr<const Map<std::string, std::string> >"
key disable_cfgpro bool
key debug_build InstallDebugOption
key slot SlotName
@@ -89,8 +89,8 @@ make_class_EbuildPretendCommandParams()
key use std::string
key use_expand std::string
key root std::string
- key profiles "tr1::shared_ptr<const FSEntryCollection>"
- key expand_vars "tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >"
+ key profiles "tr1::shared_ptr<const FSEntrySequence>"
+ key expand_vars "tr1::shared_ptr<const Map<std::string, std::string> >"
doxygen_comment << "END"
/**
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index e19b8e621..a52136a0d 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -30,12 +30,14 @@
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
#include <paludis/portage_dep_parser.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/map.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/visitor-impl.hh>
@@ -143,10 +145,10 @@ namespace
namespace
{
FSEntry
- get_root(tr1::shared_ptr<const DestinationsCollection> destinations)
+ get_root(tr1::shared_ptr<const DestinationsSet> destinations)
{
if (destinations)
- for (DestinationsCollection::Iterator d(destinations->begin()), d_end(destinations->end()) ;
+ for (DestinationsSet::Iterator d(destinations->begin()), d_end(destinations->end()) ;
d != d_end ; ++d)
if ((*d)->installed_interface)
return (*d)->installed_interface->root();
@@ -161,7 +163,7 @@ namespace
std::string use;
if (id.iuse_key())
- for (IUseFlagCollection::Iterator i(id.iuse_key()->value()->begin()),
+ for (IUseFlagSet::Iterator 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) + " ";
@@ -173,14 +175,14 @@ namespace
return use;
}
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> >
+ tr1::shared_ptr<Map<std::string, std::string> >
make_expand(const Environment * const env,
const PackageID & e,
tr1::shared_ptr<const ERepositoryProfile> profile,
std::string & use)
{
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > expand_vars(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > expand_vars(
+ new Map<std::string, std::string>);
for (ERepositoryProfile::UseExpandIterator x(profile->begin_use_expand()),
x_end(profile->end_use_expand()) ; x != x_end ; ++x)
@@ -196,9 +198,9 @@ namespace
create_inserter<UseFlagName>(std::inserter(possible_values, possible_values.end())));
/* possible values from environment */
- tr1::shared_ptr<const UseFlagNameCollection> possible_values_from_env(
+ tr1::shared_ptr<const UseFlagNameSet> possible_values_from_env(
env->known_use_expand_names(*x, e));
- for (UseFlagNameCollection::Iterator i(possible_values_from_env->begin()),
+ for (UseFlagNameSet::Iterator 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)));
@@ -212,7 +214,7 @@ namespace
use.append(lower_x + "_" + stringify(*u) + " ");
std::string value;
- AssociativeCollection<std::string, std::string>::Iterator i(expand_vars->find(stringify(*x)));
+ Map<std::string, std::string>::Iterator i(expand_vars->find(stringify(*x)));
if (expand_vars->end() != i)
{
value = i->second;
@@ -297,8 +299,8 @@ EbuildEntries::install(const tr1::shared_ptr<const PackageID> & id,
archives.append(" ");
/* add * mirror entries */
- tr1::shared_ptr<const MirrorsCollection> star_mirrors(_imp->params.environment->mirrors("*"));
- for (MirrorsCollection::Iterator m(star_mirrors->begin()), m_end(star_mirrors->end()) ; m != m_end ; ++m)
+ tr1::shared_ptr<const MirrorsSequence> star_mirrors(_imp->params.environment->mirrors("*"));
+ for (MirrorsSequence::Iterator m(star_mirrors->begin()), m_end(star_mirrors->end()) ; m != m_end ; ++m)
flat_src_uri.append(*m + "/" + spec->original_url().substr(pos + 1) + " ");
if (0 == spec->original_url().compare(0, 9, "mirror://"))
@@ -309,14 +311,14 @@ EbuildEntries::install(const tr1::shared_ptr<const PackageID> & id,
if (std::string::npos == spos)
throw PackageInstallActionError("Can't install '" + stringify(*id) + "' since SRC_URI is broken");
- tr1::shared_ptr<const MirrorsCollection> mirrors(_imp->params.environment->mirrors(mirror.substr(0, spos)));
+ tr1::shared_ptr<const MirrorsSequence> mirrors(_imp->params.environment->mirrors(mirror.substr(0, spos)));
if (! _imp->e_repository->is_mirror(mirror.substr(0, spos)) &&
mirrors->empty())
throw PackageInstallActionError("Can't install '" + stringify(*id) +
"' since SRC_URI references unknown mirror:// '" +
mirror.substr(0, spos) + "'");
- for (MirrorsCollection::Iterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
+ for (MirrorsSequence::Iterator m(mirrors->begin()), m_end(mirrors->end()) ; m != m_end ; ++m)
flat_src_uri.append(*m + "/" + mirror.substr(spos + 1) + " ");
for (RepositoryMirrorsInterface::MirrorsIterator
@@ -333,9 +335,9 @@ EbuildEntries::install(const tr1::shared_ptr<const PackageID> & id,
std::string master_mirror(strip_trailing_string(stringify(_imp->e_repository->name()), "x-"));
if (! no_mirror && _imp->e_repository->is_mirror(master_mirror))
{
- tr1::shared_ptr<const MirrorsCollection> repo_mirrors(_imp->params.environment->mirrors(master_mirror));
+ tr1::shared_ptr<const MirrorsSequence> repo_mirrors(_imp->params.environment->mirrors(master_mirror));
- for (MirrorsCollection::Iterator m(repo_mirrors->begin()), m_end(repo_mirrors->end()) ; m != m_end ; ++m)
+ for (MirrorsSequence::Iterator m(repo_mirrors->begin()), m_end(repo_mirrors->end()) ; m != m_end ; ++m)
flat_src_uri.append(*m + "/" + spec->original_url().substr(pos + 1) + " ");
for (RepositoryMirrorsInterface::MirrorsIterator
@@ -392,10 +394,10 @@ EbuildEntries::install(const tr1::shared_ptr<const PackageID> & id,
/* add expand to use (iuse isn't reliable for use_expand things), and make the expand
* environment variables */
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > expand_vars(make_expand(
+ tr1::shared_ptr<Map<std::string, std::string> > expand_vars(make_expand(
_imp->params.environment, *id, p, use));
- tr1::shared_ptr<const FSEntryCollection> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
+ tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
/* fetch */
{
@@ -567,7 +569,7 @@ EbuildEntries::get_environment_variable(const tr1::shared_ptr<const PackageID> &
throw EAPIConfigurationError("EAPI '" + id->eapi()->name + "' defines "
+ (c == 0 ? "no" : stringify(c)) + " ebuild variable phases but expected exactly one");
- tr1::shared_ptr<const FSEntryCollection> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
+ tr1::shared_ptr<const FSEntrySequence> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
EbuildVariableCommand cmd(EbuildCommandParams::create()
.environment(_imp->params.environment)
@@ -646,10 +648,10 @@ EbuildEntries::pretend(const tr1::shared_ptr<const PackageID> & id,
return true;
std::string use(make_use(_imp->params.environment, *id, p));
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > expand_vars(make_expand(
+ tr1::shared_ptr<Map<std::string, std::string> > expand_vars(make_expand(
_imp->params.environment, *id, p, use));
- tr1::shared_ptr<const FSEntryCollection> exlibsdirs(_imp->e_repository->layout()->exlibsdirs(id->name()));
+ 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()) ;
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache.cc b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
index 37315f1f4..6ff332bec 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
@@ -22,6 +22,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/join.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/set.hh>
#include <paludis/dep_spec_pretty_printer.hh>
#include <paludis/eapi.hh>
#include <fstream>
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 91723a7cc..ff8bb50ce 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -314,20 +314,20 @@ EbuildID::virtual_for_key() const
return tr1::shared_ptr<const MetadataPackageIDKey>();
}
-const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >
EbuildID::keywords_key() const
{
need_keys_added();
return _imp->keywords;
}
-const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
EbuildID::use_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >
+const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
EbuildID::iuse_key() const
{
need_keys_added();
@@ -439,7 +439,7 @@ EbuildID::binary_origin_key() const
return tr1::shared_ptr<const MetadataStringKey>();
}
-const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >
+const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
EbuildID::inherited_key() const
{
return _imp->inherited;
diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh
index 6820b2bf5..b6d3d4459 100644
--- a/paludis/repositories/e/ebuild_id.hh
+++ b/paludis/repositories/e/ebuild_id.hh
@@ -64,10 +64,10 @@ namespace paludis
virtual const tr1::shared_ptr<const EAPI> eapi() const;
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> > inherited_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/e/eclass_mtimes.cc b/paludis/repositories/e/eclass_mtimes.cc
index 041cdfe22..60a630c3f 100644
--- a/paludis/repositories/e/eclass_mtimes.cc
+++ b/paludis/repositories/e/eclass_mtimes.cc
@@ -20,6 +20,8 @@
#include "eclass_mtimes.hh"
#include <paludis/hashed_containers.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/fs_entry.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
@@ -30,17 +32,17 @@ namespace paludis
template<>
struct Implementation<EclassMtimes>
{
- tr1::shared_ptr<const FSEntryCollection> eclass_dirs;
+ tr1::shared_ptr<const FSEntrySequence> eclass_dirs;
mutable MakeHashedMap<std::string, time_t>::Type eclass_mtimes;
- Implementation(tr1::shared_ptr<const FSEntryCollection> d) :
+ Implementation(tr1::shared_ptr<const FSEntrySequence> d) :
eclass_dirs(d)
{
}
};
}
-EclassMtimes::EclassMtimes(tr1::shared_ptr<const FSEntryCollection> d) :
+EclassMtimes::EclassMtimes(tr1::shared_ptr<const FSEntrySequence> d) :
PrivateImplementationPattern<EclassMtimes>(new Implementation<EclassMtimes>(d))
{
}
@@ -57,7 +59,7 @@ EclassMtimes::mtime(const std::string & e) const
return i->second;
time_t r(0);
- for (FSEntryCollection::Iterator d(_imp->eclass_dirs->begin()),
+ for (FSEntrySequence::Iterator 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/eclass_mtimes.hh b/paludis/repositories/e/eclass_mtimes.hh
index 083f6f4e5..df96940c5 100644
--- a/paludis/repositories/e/eclass_mtimes.hh
+++ b/paludis/repositories/e/eclass_mtimes.hh
@@ -21,8 +21,8 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_ECLASS_MTIMES_HH 1
#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/util/fs_entry.hh>
-#include <paludis/util/collection.hh>
+#include <paludis/util/fs_entry-fwd.hh>
+#include <paludis/util/tr1_memory.hh>
namespace paludis
{
@@ -40,7 +40,7 @@ namespace paludis
///\name Basic operations
///\{
- EclassMtimes(tr1::shared_ptr<const FSEntryCollection>);
+ EclassMtimes(tr1::shared_ptr<const FSEntrySequence>);
~EclassMtimes();
///\}
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 153fd899a..0abd9385f 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -30,17 +30,19 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tr1_functional.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/set.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <paludis/util/tr1_functional.hh>
#include <functional>
#include <algorithm>
+#include <list>
using namespace paludis;
@@ -61,14 +63,14 @@ namespace paludis
mutable PackagesMap package_names;
mutable IDMap ids;
- mutable tr1::shared_ptr<CategoryNamePartCollection> category_names_collection;
+ mutable tr1::shared_ptr<CategoryNamePartSet> category_names_collection;
tr1::shared_ptr<const ERepositoryEntries> entries;
- tr1::shared_ptr<FSEntryCollection> arch_list_files;
- tr1::shared_ptr<FSEntryCollection> repository_mask_files;
- tr1::shared_ptr<FSEntryCollection> profiles_desc_files;
- tr1::shared_ptr<FSEntryCollection> mirror_files;
- tr1::shared_ptr<FSEntryCollection> use_desc_dirs;
+ tr1::shared_ptr<FSEntrySequence> arch_list_files;
+ tr1::shared_ptr<FSEntrySequence> repository_mask_files;
+ tr1::shared_ptr<FSEntrySequence> profiles_desc_files;
+ tr1::shared_ptr<FSEntrySequence> mirror_files;
+ tr1::shared_ptr<FSEntrySequence> use_desc_dirs;
Implementation(const ERepository * const n, const FSEntry & t,
tr1::shared_ptr<const ERepositoryEntries> e) :
@@ -76,11 +78,11 @@ namespace paludis
tree_root(t),
has_category_names(false),
entries(e),
- arch_list_files(new FSEntryCollection::Concrete),
- repository_mask_files(new FSEntryCollection::Concrete),
- profiles_desc_files(new FSEntryCollection::Concrete),
- mirror_files(new FSEntryCollection::Concrete),
- use_desc_dirs(new FSEntryCollection::Concrete)
+ arch_list_files(new FSEntrySequence),
+ repository_mask_files(new FSEntrySequence),
+ profiles_desc_files(new FSEntrySequence),
+ mirror_files(new FSEntrySequence),
+ use_desc_dirs(new FSEntrySequence)
{
}
};
@@ -173,7 +175,7 @@ ExheresLayout::need_package_ids(const QualifiedPackageName & n) const
Context context("When loading versions for '" + stringify(n) + "' in "
+ stringify(_imp->repository->name()) + ":");
- tr1::shared_ptr<PackageIDSequence> v(new PackageIDSequence::Concrete);
+ tr1::shared_ptr<PackageIDSequence> v(new PackageIDSequence);
FSEntry path(_imp->tree_root / "packages" / stringify(n.category) / stringify(n.package));
@@ -256,13 +258,13 @@ ExheresLayout::need_category_names_collection() const
need_category_names();
- _imp->category_names_collection.reset(new CategoryNamePartCollection::Concrete);
+ _imp->category_names_collection.reset(new CategoryNamePartSet);
std::copy(_imp->category_names.begin(), _imp->category_names.end(),
transform_inserter(_imp->category_names_collection->inserter(),
tr1::mem_fn(&std::pair<const CategoryNamePart, bool>::first)));
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
ExheresLayout::category_names() const
{
Context context("When fetching category names in " + stringify(stringify(_imp->repository->name())) + ":");
@@ -271,7 +273,7 @@ ExheresLayout::category_names() const
return _imp->category_names_collection;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
ExheresLayout::package_names(const CategoryNamePart & c) const
{
using namespace tr1::placeholders;
@@ -286,7 +288,7 @@ ExheresLayout::package_names(const CategoryNamePart & c) const
need_category_names();
if (_imp->category_names.end() == _imp->category_names.find(c))
- return tr1::shared_ptr<QualifiedPackageNameCollection>(new QualifiedPackageNameCollection::Concrete);
+ return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
if ((_imp->tree_root / "packages" / stringify(c)).is_directory_or_symlink_to_directory())
for (DirIterator d(_imp->tree_root / "packages" / stringify(c)), d_end ; d != d_end ; ++d)
@@ -313,7 +315,7 @@ ExheresLayout::package_names(const CategoryNamePart & c) const
_imp->category_names[c] = true;
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
for (PackagesMap::const_iterator p(_imp->package_names.begin()), p_end(_imp->package_names.end()) ;
p != p_end ; ++p)
@@ -334,7 +336,7 @@ ExheresLayout::package_ids(const QualifiedPackageName & n) const
return _imp->ids.find(n)->second;
}
else
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
}
FSEntry
@@ -361,31 +363,31 @@ ExheresLayout::category_directory(const CategoryNamePart & cat) const
return _imp->tree_root / "packages" / stringify(cat);
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
ExheresLayout::arch_list_files() const
{
return _imp->arch_list_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
ExheresLayout::repository_mask_files() const
{
return _imp->repository_mask_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
ExheresLayout::profiles_desc_files() const
{
return _imp->profiles_desc_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
ExheresLayout::mirror_files() const
{
return _imp->mirror_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
ExheresLayout::use_desc_dirs() const
{
return _imp->use_desc_dirs;
@@ -421,10 +423,10 @@ ExheresLayout::profiles_base_dir() const
return _imp->tree_root / "profiles";
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
ExheresLayout::exlibsdirs(const QualifiedPackageName & q) const
{
- tr1::shared_ptr<FSEntryCollection> result(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
if (_imp->repository->params().master_repository)
result->push_back(_imp->repository->params().master_repository->params().location / "exlibs");
diff --git a/paludis/repositories/e/exheres_layout.hh b/paludis/repositories/e/exheres_layout.hh
index 9bfd074a0..b7f159f47 100644
--- a/paludis/repositories/e/exheres_layout.hh
+++ b/paludis/repositories/e/exheres_layout.hh
@@ -60,10 +60,10 @@ namespace paludis
virtual bool has_package_named(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -86,19 +86,19 @@ namespace paludis
virtual FSEntry package_file(const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> arch_list_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> arch_list_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> repository_mask_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> repository_mask_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> profiles_desc_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> profiles_desc_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> mirror_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> mirror_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> use_desc_dirs() const
+ virtual tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool eapi_ebuild_suffix() const
@@ -107,7 +107,7 @@ namespace paludis
virtual FSEntry profiles_base_dir() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> exlibsdirs(const QualifiedPackageName &) const;
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs(const QualifiedPackageName &) const;
};
}
diff --git a/paludis/repositories/e/glsa.hh b/paludis/repositories/e/glsa.hh
index 6de46d329..7fa03f806 100644
--- a/paludis/repositories/e/glsa.hh
+++ b/paludis/repositories/e/glsa.hh
@@ -22,6 +22,7 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/sr.hh>
+#include <paludis/util/tr1_memory.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
diff --git a/paludis/repositories/e/layout.cc b/paludis/repositories/e/layout.cc
index 6fa7aa7f1..cec1ab19a 100644
--- a/paludis/repositories/e/layout.cc
+++ b/paludis/repositories/e/layout.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/e/layout.hh>
#include <paludis/repositories/e/traditional_layout.hh>
#include <paludis/repositories/e/exheres_layout.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/virtual_constructor-impl.hh>
#include <paludis/util/instantiation_policy-impl.hh>
diff --git a/paludis/repositories/e/layout.hh b/paludis/repositories/e/layout.hh
index c7caf831c..c223de988 100644
--- a/paludis/repositories/e/layout.hh
+++ b/paludis/repositories/e/layout.hh
@@ -78,10 +78,10 @@ namespace paludis
virtual bool has_package_named(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const CategoryNamePartCollection> category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
@@ -104,19 +104,19 @@ namespace paludis
virtual FSEntry package_file(const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const FSEntryCollection> arch_list_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> arch_list_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const FSEntryCollection> repository_mask_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> repository_mask_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const FSEntryCollection> profiles_desc_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> profiles_desc_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const FSEntryCollection> mirror_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> mirror_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const FSEntryCollection> use_desc_dirs() const
+ virtual tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
virtual bool eapi_ebuild_suffix() const
@@ -125,7 +125,7 @@ namespace paludis
virtual FSEntry profiles_base_dir() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual tr1::shared_ptr<const FSEntryCollection> exlibsdirs(const QualifiedPackageName &) const
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
///\}
diff --git a/paludis/repositories/e/make_ebin_repository.cc b/paludis/repositories/e/make_ebin_repository.cc
index d7019b723..a6c49a19e 100644
--- a/paludis/repositories/e/make_ebin_repository.cc
+++ b/paludis/repositories/e/make_ebin_repository.cc
@@ -19,8 +19,9 @@
#include "make_ebin_repository.hh"
#include <paludis/util/log.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/environment.hh>
#include <paludis/distribution.hh>
@@ -32,7 +33,7 @@ using namespace paludis;
tr1::shared_ptr<ERepository>
paludis::make_ebin_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
std::string repo_file(m->end() == m->find("repo_file") ? std::string("?") :
m->find("repo_file")->second);
@@ -67,7 +68,7 @@ paludis::make_ebin_repository(
"be used as a master repository");
}
- tr1::shared_ptr<FSEntryCollection> profiles(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> profiles(new FSEntrySequence);
if (m->end() != m->find("profiles"))
WhitespaceTokeniser::get_instance()->tokenise(m->find("profiles")->second,
create_inserter<FSEntry>(std::back_inserter(*profiles)));
@@ -76,12 +77,12 @@ paludis::make_ebin_repository(
{
if (master_repository)
std::copy(master_repository->params().profiles->begin(),
- master_repository->params().profiles->end(), profiles->inserter());
+ master_repository->params().profiles->end(), profiles->back_inserter());
else
throw ERepositoryConfigurationError("No profiles have been specified");
}
- tr1::shared_ptr<FSEntryCollection> eclassdirs(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
std::string setsdir;
if (m->end() == m->find("setsdir") || ((setsdir = m->find("setsdir")->second)).empty())
@@ -170,7 +171,7 @@ paludis::make_ebin_repository(
.cache(FSEntry("/var/empty"))
.write_cache(FSEntry("/var/empty"))
.names_cache(names_cache)
- .eclassdirs(tr1::shared_ptr<const FSEntryCollection>(new FSEntryCollection::Concrete))
+ .eclassdirs(tr1::shared_ptr<const FSEntrySequence>(new FSEntrySequence))
.distdir(FSEntry("/var/empty"))
.securitydir(securitydir)
.setsdir(setsdir)
@@ -188,7 +189,7 @@ paludis::make_ebin_repository(
tr1::shared_ptr<Repository>
paludis::make_ebin_repository_wrapped(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
return make_ebin_repository(env, m);
}
diff --git a/paludis/repositories/e/make_ebin_repository.hh b/paludis/repositories/e/make_ebin_repository.hh
index dee233bbb..aaa864432 100644
--- a/paludis/repositories/e/make_ebin_repository.hh
+++ b/paludis/repositories/e/make_ebin_repository.hh
@@ -21,6 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_GENTOO_MAKE_EBIN_REPOSITORY_HH 1
#include <paludis/repositories/e/e_repository.hh>
+#include <paludis/util/map-fwd.hh>
namespace paludis
{
@@ -33,7 +34,7 @@ namespace paludis
tr1::shared_ptr<ERepository>
make_ebin_repository(
Environment * const,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >) PALUDIS_VISIBLE;
+ tr1::shared_ptr<const Map<std::string, std::string> >) PALUDIS_VISIBLE;
/**
* Create an ebin format repository (wrapper for our virtual constructor).
@@ -44,7 +45,7 @@ namespace paludis
tr1::shared_ptr<Repository>
make_ebin_repository_wrapped(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m);
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
}
diff --git a/paludis/repositories/e/make_ebuild_repository.cc b/paludis/repositories/e/make_ebuild_repository.cc
index a3b9b246d..0fd8c9bef 100644
--- a/paludis/repositories/e/make_ebuild_repository.cc
+++ b/paludis/repositories/e/make_ebuild_repository.cc
@@ -19,8 +19,9 @@
#include "make_ebuild_repository.hh"
#include <paludis/util/log.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/environment.hh>
#include <paludis/distribution.hh>
@@ -32,7 +33,7 @@ using namespace paludis;
tr1::shared_ptr<ERepository>
paludis::make_ebuild_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
std::string repo_file(m->end() == m->find("repo_file") ? std::string("?") :
m->find("repo_file")->second);
@@ -67,7 +68,7 @@ paludis::make_ebuild_repository(
"be used as a master repository");
}
- tr1::shared_ptr<FSEntryCollection> profiles(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> profiles(new FSEntrySequence);
if (m->end() != m->find("profiles"))
WhitespaceTokeniser::get_instance()->tokenise(m->find("profiles")->second,
create_inserter<FSEntry>(std::back_inserter(*profiles)));
@@ -76,12 +77,12 @@ paludis::make_ebuild_repository(
{
if (master_repository)
std::copy(master_repository->params().profiles->begin(),
- master_repository->params().profiles->end(), profiles->inserter());
+ master_repository->params().profiles->end(), profiles->back_inserter());
else
throw ERepositoryConfigurationError("No profiles have been specified");
}
- tr1::shared_ptr<FSEntryCollection> eclassdirs(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
if (m->end() != m->find("eclassdirs"))
WhitespaceTokeniser::get_instance()->tokenise(m->find("eclassdirs")->second,
@@ -91,7 +92,7 @@ paludis::make_ebuild_repository(
{
if (master_repository)
std::copy(master_repository->params().eclassdirs->begin(),
- master_repository->params().eclassdirs->end(), eclassdirs->inserter());
+ master_repository->params().eclassdirs->end(), eclassdirs->back_inserter());
eclassdirs->push_back(location + "/eclass");
}
@@ -215,7 +216,7 @@ paludis::make_ebuild_repository(
tr1::shared_ptr<Repository>
paludis::make_ebuild_repository_wrapped(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
return make_ebuild_repository(env, m);
}
diff --git a/paludis/repositories/e/make_ebuild_repository.hh b/paludis/repositories/e/make_ebuild_repository.hh
index fe4e1829a..7cc482d20 100644
--- a/paludis/repositories/e/make_ebuild_repository.hh
+++ b/paludis/repositories/e/make_ebuild_repository.hh
@@ -21,6 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_MAKE_EBUILD_REPOSITORY_HH 1
#include <paludis/repositories/e/e_repository.hh>
+#include <paludis/util/map-fwd.hh>
namespace paludis
{
@@ -33,7 +34,7 @@ namespace paludis
tr1::shared_ptr<ERepository>
make_ebuild_repository(
Environment * const,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >) PALUDIS_VISIBLE;
+ tr1::shared_ptr<const Map<std::string, std::string> >) PALUDIS_VISIBLE;
/**
* Create an ebuild format repository (wrapper for our virtual constructor).
@@ -44,7 +45,7 @@ namespace paludis
tr1::shared_ptr<Repository>
make_ebuild_repository_wrapped(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m);
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
}
#endif
diff --git a/paludis/repositories/e/qa/qa_controller.cc b/paludis/repositories/e/qa/qa_controller.cc
index ff2838d22..47f003b7d 100644
--- a/paludis/repositories/e/qa/qa_controller.cc
+++ b/paludis/repositories/e/qa/qa_controller.cc
@@ -22,6 +22,7 @@
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/set.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -90,8 +91,8 @@ QAController::run()
tr1::bind<bool>(tr1::mem_fn(&TreeCheckFunction::operator() ),
_1, tr1::ref(_imp->reporter), _imp->env, _imp->repo, _imp->repo->params().location)));
- tr1::shared_ptr<const CategoryNamePartCollection> categories(_imp->repo->category_names());
- for (CategoryNamePartCollection::Iterator c(categories->begin()), c_end(categories->end()) ;
+ tr1::shared_ptr<const CategoryNamePartSet> categories(_imp->repo->category_names());
+ for (CategoryNamePartSet::Iterator c(categories->begin()), c_end(categories->end()) ;
c != c_end ; ++c)
std::find_if(
QAChecks::get_instance()->category_dir_checks_group()->begin(),
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index 7656a9bc8..3fde4661a 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -22,6 +22,7 @@
#include <paludis/repositories/e/make_ebin_repository.hh>
#include <paludis/repositories/e/vdb_repository.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/map.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
#include "config.h"
@@ -40,7 +41,7 @@ namespace
tr1::shared_ptr<Repository>
make_portage_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
std::string repo_file = "?";
if (m->end() != m->find("repo_file"))
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 8fb5ee8ed..a4fd2024c 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -29,15 +29,17 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/log.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/set.hh>
#include <paludis/util/tr1_functional.hh>
#include <functional>
#include <algorithm>
+#include <list>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
@@ -61,14 +63,14 @@ namespace paludis
mutable PackagesMap package_names;
mutable IDMap ids;
- mutable tr1::shared_ptr<CategoryNamePartCollection> category_names_collection;
+ mutable tr1::shared_ptr<CategoryNamePartSet> category_names_collection;
tr1::shared_ptr<const ERepositoryEntries> entries;
- tr1::shared_ptr<FSEntryCollection> arch_list_files;
- tr1::shared_ptr<FSEntryCollection> repository_mask_files;
- tr1::shared_ptr<FSEntryCollection> profiles_desc_files;
- tr1::shared_ptr<FSEntryCollection> mirror_files;
- tr1::shared_ptr<FSEntryCollection> use_desc_dirs;
+ tr1::shared_ptr<FSEntrySequence> arch_list_files;
+ tr1::shared_ptr<FSEntrySequence> repository_mask_files;
+ tr1::shared_ptr<FSEntrySequence> profiles_desc_files;
+ tr1::shared_ptr<FSEntrySequence> mirror_files;
+ tr1::shared_ptr<FSEntrySequence> use_desc_dirs;
Implementation(const ERepository * const r, const FSEntry & t,
tr1::shared_ptr<const ERepositoryEntries> e) :
@@ -76,11 +78,11 @@ namespace paludis
tree_root(t),
has_category_names(false),
entries(e),
- arch_list_files(new FSEntryCollection::Concrete),
- repository_mask_files(new FSEntryCollection::Concrete),
- profiles_desc_files(new FSEntryCollection::Concrete),
- mirror_files(new FSEntryCollection::Concrete),
- use_desc_dirs(new FSEntryCollection::Concrete)
+ arch_list_files(new FSEntrySequence),
+ repository_mask_files(new FSEntrySequence),
+ profiles_desc_files(new FSEntrySequence),
+ mirror_files(new FSEntrySequence),
+ use_desc_dirs(new FSEntrySequence)
{
}
};
@@ -193,7 +195,7 @@ TraditionalLayout::need_package_ids(const QualifiedPackageName & n) const
Context context("When loading versions for '" + stringify(n) + "' in "
+ stringify(_imp->repository->name()) + ":");
- tr1::shared_ptr<PackageIDSequence> v(new PackageIDSequence::Concrete);
+ tr1::shared_ptr<PackageIDSequence> v(new PackageIDSequence);
FSEntry path(_imp->tree_root / stringify(n.category) / stringify(n.package));
@@ -275,13 +277,13 @@ TraditionalLayout::need_category_names_collection() const
need_category_names();
- _imp->category_names_collection.reset(new CategoryNamePartCollection::Concrete);
+ _imp->category_names_collection.reset(new CategoryNamePartSet);
std::copy(_imp->category_names.begin(), _imp->category_names.end(),
transform_inserter(_imp->category_names_collection->inserter(),
tr1::mem_fn(&std::pair<const CategoryNamePart, bool>::first)));
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
TraditionalLayout::category_names() const
{
Context context("When fetching category names in " + stringify(stringify(_imp->repository->name())) + ":");
@@ -290,7 +292,7 @@ TraditionalLayout::category_names() const
return _imp->category_names_collection;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
TraditionalLayout::package_names(const CategoryNamePart & c) const
{
using namespace tr1::placeholders;
@@ -305,7 +307,7 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
need_category_names();
if (_imp->category_names.end() == _imp->category_names.find(c))
- return tr1::shared_ptr<QualifiedPackageNameCollection>(new QualifiedPackageNameCollection::Concrete);
+ return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
if ((_imp->tree_root / stringify(c)).is_directory_or_symlink_to_directory())
for (DirIterator d(_imp->tree_root / stringify(c)), d_end ; d != d_end ; ++d)
@@ -332,7 +334,7 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
_imp->category_names[c] = true;
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
for (PackagesMap::const_iterator p(_imp->package_names.begin()), p_end(_imp->package_names.end()) ;
p != p_end ; ++p)
@@ -353,7 +355,7 @@ TraditionalLayout::package_ids(const QualifiedPackageName & n) const
return _imp->ids.find(n)->second;
}
else
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
}
FSEntry
@@ -380,31 +382,31 @@ TraditionalLayout::category_directory(const CategoryNamePart & cat) const
return _imp->tree_root / stringify(cat);
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
TraditionalLayout::arch_list_files() const
{
return _imp->arch_list_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
TraditionalLayout::repository_mask_files() const
{
return _imp->repository_mask_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
TraditionalLayout::profiles_desc_files() const
{
return _imp->profiles_desc_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
TraditionalLayout::mirror_files() const
{
return _imp->mirror_files;
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
TraditionalLayout::use_desc_dirs() const
{
return _imp->use_desc_dirs;
@@ -440,10 +442,10 @@ TraditionalLayout::profiles_base_dir() const
return _imp->tree_root / "profiles";
}
-tr1::shared_ptr<const FSEntryCollection>
+tr1::shared_ptr<const FSEntrySequence>
TraditionalLayout::exlibsdirs(const QualifiedPackageName & q) const
{
- tr1::shared_ptr<FSEntryCollection> result(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
if (_imp->repository->params().master_repository)
result->push_back(_imp->repository->params().master_repository->params().location / "exlibs");
diff --git a/paludis/repositories/e/traditional_layout.hh b/paludis/repositories/e/traditional_layout.hh
index 76e9e8eb5..9b9730510 100644
--- a/paludis/repositories/e/traditional_layout.hh
+++ b/paludis/repositories/e/traditional_layout.hh
@@ -61,10 +61,10 @@ namespace paludis
virtual bool has_package_named(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -87,19 +87,19 @@ namespace paludis
virtual FSEntry package_file(const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> arch_list_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> arch_list_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> repository_mask_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> repository_mask_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> profiles_desc_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> profiles_desc_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> mirror_files() const
+ virtual tr1::shared_ptr<const FSEntrySequence> mirror_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> use_desc_dirs() const
+ virtual tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool eapi_ebuild_suffix() const
@@ -108,7 +108,7 @@ namespace paludis
virtual FSEntry profiles_base_dir() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const FSEntryCollection> exlibsdirs(const QualifiedPackageName &) const
+ virtual tr1::shared_ptr<const FSEntrySequence> exlibsdirs(const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/e/vdb_id.cc b/paludis/repositories/e/vdb_id.cc
index ba9fad281..f5ca6e1f3 100644
--- a/paludis/repositories/e/vdb_id.cc
+++ b/paludis/repositories/e/vdb_id.cc
@@ -65,9 +65,9 @@ namespace paludis
tr1::shared_ptr<const SlotName> slot;
tr1::shared_ptr<const EAPI> eapi;
- tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> > use;
- tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> > inherited;
- tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> > iuse;
+ tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use;
+ tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited;
+ tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse;
tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license;
tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide;
tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies;
@@ -385,27 +385,27 @@ VDBID::virtual_for_key() const
return tr1::shared_ptr<const MetadataPackageIDKey>();
}
-const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >
VDBID::keywords_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
VDBID::use_key() const
{
need_keys_added();
return _imp->use;
}
-const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >
+const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
VDBID::iuse_key() const
{
need_keys_added();
return _imp->iuse;
}
-const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >
+const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
VDBID::inherited_key() const
{
need_keys_added();
diff --git a/paludis/repositories/e/vdb_id.hh b/paludis/repositories/e/vdb_id.hh
index 2c14db381..3eee1cd37 100644
--- a/paludis/repositories/e/vdb_id.hh
+++ b/paludis/repositories/e/vdb_id.hh
@@ -57,10 +57,10 @@ namespace paludis
virtual const tr1::shared_ptr<const EAPI> eapi() const;
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> > inherited_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> > iuse_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index 4d80a7562..5bc6c2f2d 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -23,6 +23,8 @@
#include <paludis/util/system.hh>
#include <paludis/util/join.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/fs_entry.hh>
#include <paludis/hook.hh>
#include <paludis/package_id.hh>
#include <paludis/digests/md5.hh>
@@ -78,7 +80,7 @@ VDBMerger::~VDBMerger()
Hook
VDBMerger::extend_hook(const Hook & h)
{
- tr1::shared_ptr<const FSEntryCollection> bashrc_files(_imp->options.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(_imp->options.environment->bashrc_files());
if (_imp->options.package_id)
{
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 2a19706e7..e2f2589b4 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -46,7 +46,6 @@
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/tr1_functional.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fast_unique_copy.hh>
#include <paludis/util/fs_entry.hh>
@@ -54,6 +53,9 @@
#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
#include <paludis/util/pstream.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/map.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/strip.hh>
@@ -81,7 +83,7 @@ using namespace paludis::erepository;
#include <paludis/repositories/e/vdb_repository-sr.cc>
-typedef MakeHashedMap<CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameCollection> >::Type CategoryMap;
+typedef MakeHashedMap<CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::Type CategoryMap;
typedef MakeHashedMap<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::Type IDMap;
namespace paludis
@@ -190,33 +192,33 @@ VDBRepository::do_has_package_named(const QualifiedPackageName & q) const
return cat_iter->second->end() != cat_iter->second->find(q);
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
VDBRepository::do_category_names() const
{
Context context("When fetching category names in " + stringify(name()) + ":");
need_category_names();
- tr1::shared_ptr<CategoryNamePartCollection> result(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
std::copy(_imp->categories.begin(), _imp->categories.end(),
transform_inserter(result->inserter(),
- tr1::mem_fn(&std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameCollection> >::first)));
+ tr1::mem_fn(&std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::first)));
return result;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
VDBRepository::do_package_names(const CategoryNamePart & c) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
need_category_names();
if (! has_category_named(c))
- return make_shared_ptr(new QualifiedPackageNameCollection::Concrete);
+ return make_shared_ptr(new QualifiedPackageNameSet);
need_package_ids(c);
@@ -232,11 +234,11 @@ VDBRepository::do_package_ids(const QualifiedPackageName & n) const
need_category_names();
if (! has_category_named(n.category))
- return make_shared_ptr(new PackageIDSequence::Concrete);
+ return make_shared_ptr(new PackageIDSequence);
need_package_ids(n.category);
if (! has_package_named(n))
- return make_shared_ptr(new PackageIDSequence::Concrete);
+ return make_shared_ptr(new PackageIDSequence);
return _imp->ids.find(n)->second;
}
@@ -268,7 +270,7 @@ VDBRepository::do_query_use_force(const UseFlagName & u, const PackageID & e) co
tr1::shared_ptr<Repository>
VDBRepository::make_vdb_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
std::string repo_file(m->end() == m->find("repo_file") ? std::string("?") : m->find("repo_file")->second);
Context context("When making VDB repository from repo_file '" + repo_file + "':");
@@ -347,7 +349,7 @@ VDBRepository::_uninstall(const tr1::shared_ptr<const PackageID> & id,
std::string reinstalling_str(reinstalling ? "-reinstalling-" : "");
- tr1::shared_ptr<FSEntryCollection> eclassdirs(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
eclassdirs->push_back(FSEntry(_imp->params.location / stringify(id->name().category) /
(reinstalling_str + stringify(id->name().package) + "-" + stringify(id->version()))));
@@ -395,7 +397,7 @@ VDBRepository::_uninstall(const tr1::shared_ptr<const PackageID> & id,
.ebuild_file(pkg_dir / (stringify(id->name().package) + "-" + stringify(id->version()) + ".ebuild"))
.files_dir(pkg_dir)
.eclassdirs(eclassdirs)
- .exlibsdirs(make_shared_ptr(new FSEntryCollection::Concrete))
+ .exlibsdirs(make_shared_ptr(new FSEntrySequence))
.portdir(_imp->params.location)
.distdir(pkg_dir)
.sandbox(phase->option("sandbox"))
@@ -430,7 +432,7 @@ VDBRepository::do_config(const tr1::shared_ptr<const PackageID> & id) const
throw PackageInstallActionError("Couldn't configure '" + stringify(*id) +
"' because root ('" + stringify(_imp->params.root) + "') is not a directory");
- tr1::shared_ptr<FSEntryCollection> eclassdirs(new FSEntryCollection::Concrete);
+ tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
eclassdirs->push_back(FSEntry(_imp->params.location / stringify(id->name().category) /
(stringify(id->name().package) + "-" + stringify(id->version()))));
@@ -450,7 +452,7 @@ VDBRepository::do_config(const tr1::shared_ptr<const PackageID> & id) const
.ebuild_file(pkg_dir / (stringify(id->name().package) + "-" + stringify(id->version()) + ".ebuild"))
.files_dir(pkg_dir)
.eclassdirs(eclassdirs)
- .exlibsdirs(make_shared_ptr(new FSEntryCollection::Concrete))
+ .exlibsdirs(make_shared_ptr(new FSEntrySequence))
.portdir(_imp->params.location)
.distdir(pkg_dir)
.sandbox(phase->option("sandbox"))
@@ -484,11 +486,11 @@ VDBRepository::do_package_set(const SetName & s) const
std::for_each(_imp->categories.begin(), _imp->categories.end(),
tr1::bind(tr1::mem_fn(&VDBRepository::need_package_ids), this,
tr1::bind<CategoryNamePart>(tr1::mem_fn(
- &std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameCollection> >::first), _1)));
+ &std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::first), _1)));
for (CategoryMap::const_iterator i(_imp->categories.begin()), i_end(_imp->categories.end()) ;
i != i_end ; ++i)
- for (QualifiedPackageNameCollection::Iterator e(i->second->begin()), e_end(i->second->end()) ;
+ for (QualifiedPackageNameSet::Iterator e(i->second->begin()), e_end(i->second->end()) ;
e != e_end ; ++e)
{
tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
@@ -525,12 +527,12 @@ VDBRepository::do_package_set(const SetName & s) const
return tr1::shared_ptr<SetSpecTree::ConstItem>();
}
-tr1::shared_ptr<const SetNameCollection>
+tr1::shared_ptr<const SetNameSet>
VDBRepository::sets_list() const
{
Context context("While generating the list of sets:");
- tr1::shared_ptr<SetNameCollection> result(new SetNameCollection::Concrete);
+ tr1::shared_ptr<SetNameSet> result(new SetNameSet);
result->insert(SetName("everything"));
result->insert(SetName("world"));
return result;
@@ -665,28 +667,28 @@ VDBRepository::provided_packages() const
return _imp->provides;
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
VDBRepository::do_arch_flags() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
VDBRepository::do_use_expand_flags() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
VDBRepository::do_use_expand_prefixes() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
VDBRepository::do_use_expand_hidden_prefixes() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
bool
@@ -697,7 +699,7 @@ VDBRepository::load_provided_using_cache() const
Context context("When loading VDB PROVIDEs map using '" + stringify(_imp->params.provides_cache) + "':");
- tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence::Concrete);
+ tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence);
if (! _imp->params.provides_cache.is_regular_file())
{
@@ -771,13 +773,13 @@ VDBRepository::load_provided_the_slow_way() const
Log::get_instance()->message(ll_debug, lc_no_context, "Starting VDB PROVIDEs map creation");
- tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence::Concrete);
+ tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence);
need_category_names();
std::for_each(_imp->categories.begin(), _imp->categories.end(),
tr1::bind(tr1::mem_fn(&VDBRepository::need_package_ids), this,
tr1::bind<CategoryNamePart>(tr1::mem_fn(
- &std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameCollection> >::first), _1)));
+ &std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::first), _1)));
for (IDMap::const_iterator i(_imp->ids.begin()), i_end(_imp->ids.end()) ;
@@ -853,7 +855,7 @@ VDBRepository::regenerate_provides_cache() const
std::for_each(_imp->categories.begin(), _imp->categories.end(),
tr1::bind(tr1::mem_fn(&VDBRepository::need_package_ids), this,
tr1::bind<CategoryNamePart>(tr1::mem_fn(
- &std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameCollection> >::first), _1)));
+ &std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::first), _1)));
std::ofstream f(stringify(_imp->params.provides_cache).c_str());
if (! f)
@@ -887,13 +889,13 @@ VDBRepository::regenerate_provides_cache() const
}
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
VDBRepository::do_category_names_containing_package(const PackageNamePart & p) const
{
if (! _imp->names_cache->usable())
return Repository::do_category_names_containing_package(p);
- tr1::shared_ptr<const CategoryNamePartCollection> result(
+ tr1::shared_ptr<const CategoryNamePartSet> result(
_imp->names_cache->category_names_containing_package(p));
return result ? result : Repository::do_category_names_containing_package(p);
@@ -1040,7 +1042,7 @@ VDBRepository::need_category_names() const
{
if (d->is_directory_or_symlink_to_directory())
_imp->categories.insert(std::make_pair(CategoryNamePart(d->basename()),
- tr1::shared_ptr<QualifiedPackageNameCollection>()));
+ tr1::shared_ptr<QualifiedPackageNameSet>()));
}
catch (const Exception & e)
{
@@ -1060,7 +1062,7 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
Context context("When loading package names from '" + stringify(_imp->params.location) +
"' in category '" + stringify(c) + "':");
- tr1::shared_ptr<QualifiedPackageNameCollection> q(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> q(new QualifiedPackageNameSet);
for (DirIterator d(_imp->params.location / stringify(c)), d_end ; d != d_end ; ++d)
try
@@ -1075,7 +1077,7 @@ VDBRepository::need_package_ids(const CategoryNamePart & c) const
q->insert(*p.package_ptr());
IDMap::iterator i(_imp->ids.find(*p.package_ptr()));
if (_imp->ids.end() == i)
- i = _imp->ids.insert(std::make_pair(*p.package_ptr(), make_shared_ptr(new PackageIDSequence::Concrete))).first;
+ i = _imp->ids.insert(std::make_pair(*p.package_ptr(), make_shared_ptr(new PackageIDSequence))).first;
i->second->push_back(make_id(*p.package_ptr(), p.version_requirements_ptr()->begin()->version_spec, *d));
}
}
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index fdfb49f41..4adc995ff 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -25,6 +25,7 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/tr1_memory.hh>
+#include <paludis/util/map.hh>
/** \file
* Declarations for VDBRepository.
@@ -99,16 +100,16 @@ namespace paludis
virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_arch_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_hidden_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string do_describe_use_flag(const UseFlagName &,
@@ -120,7 +121,7 @@ namespace paludis
virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const SetNameCollection> sets_list() const
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const
PALUDIS_ATTRIBUTE((warn_unused_result));
/* RepositoryUninstallableInterface */
@@ -180,21 +181,21 @@ namespace paludis
/**
* Override in descendents: fetch package names.
*/
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents: fetch category names.
*/
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
/**
* Override in descendents if a fast implementation is available: fetch category names
* that contain a particular package.
*/
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names_containing_package(
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names_containing_package(
const PackageNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -221,7 +222,7 @@ namespace paludis
*/
static tr1::shared_ptr<Repository> make_vdb_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m);
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
/**
* Destructor.
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index 093493c65..a306f7eb0 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -33,6 +33,7 @@ using namespace paludis;
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/util/tokeniser.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -133,7 +134,7 @@ VDBUnmerger::~VDBUnmerger()
Hook
VDBUnmerger::extend_hook(const Hook & h) const
{
- tr1::shared_ptr<const FSEntryCollection> bashrc_files(_imp->options.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(_imp->options.environment->bashrc_files());
Hook result(Unmerger::extend_hook(h)
("CONFIG_PROTECT", _imp->options.config_protect)
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 1d9990542..d5418bebd 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -18,9 +18,10 @@
*/
#include "fake_installed_repository.hh"
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/set.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
@@ -70,14 +71,14 @@ FakeInstalledRepository::is_suitable_destination_for(const PackageID &) const
tr1::shared_ptr<const FakeInstalledRepository::ProvidesSequence>
FakeInstalledRepository::provided_packages() const
{
- tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence::Concrete);
+ tr1::shared_ptr<ProvidesSequence> result(new ProvidesSequence);
- tr1::shared_ptr<const CategoryNamePartCollection> cats(category_names());
- for (CategoryNamePartCollection::Iterator c(cats->begin()), c_end(cats->end()) ;
+ tr1::shared_ptr<const CategoryNamePartSet> cats(category_names());
+ for (CategoryNamePartSet::Iterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
- tr1::shared_ptr<const QualifiedPackageNameCollection> pkgs(package_names(*c));
- for (QualifiedPackageNameCollection::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
+ tr1::shared_ptr<const QualifiedPackageNameSet> pkgs(package_names(*c));
+ for (QualifiedPackageNameSet::Iterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
tr1::shared_ptr<const PackageIDSequence> vers(package_ids(*p));
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 0314616d2..52b3b4f18 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -26,72 +26,74 @@
#include <paludis/hashed_containers.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/iterator.hh>
+#include <paludis/util/set.hh>
#include <paludis/util/visitor-impl.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
+#include <list>
+
using namespace paludis;
namespace paludis
{
template <>
template <typename C_>
- struct Implementation<FakeMetadataCollectionKey<C_> >
+ struct Implementation<FakeMetadataSetKey<C_> >
{
tr1::shared_ptr<C_> collection;
};
}
template <typename C_>
-FakeMetadataCollectionKey<C_>::FakeMetadataCollectionKey(
+FakeMetadataSetKey<C_>::FakeMetadataSetKey(
const std::string & r, const std::string & h, const MetadataKeyType t) :
- MetadataCollectionKey<C_>(r, h, t),
- PrivateImplementationPattern<FakeMetadataCollectionKey<C_> >(new Implementation<FakeMetadataCollectionKey<C_> >),
- _imp(PrivateImplementationPattern<FakeMetadataCollectionKey<C_> >::_imp.get())
+ MetadataSetKey<C_>(r, h, t),
+ PrivateImplementationPattern<FakeMetadataSetKey<C_> >(new Implementation<FakeMetadataSetKey<C_> >),
+ _imp(PrivateImplementationPattern<FakeMetadataSetKey<C_> >::_imp.get())
{
}
template <typename C_>
-FakeMetadataCollectionKey<C_>::~FakeMetadataCollectionKey()
+FakeMetadataSetKey<C_>::~FakeMetadataSetKey()
{
}
template <typename C_>
const tr1::shared_ptr<const C_>
-FakeMetadataCollectionKey<C_>::value() const
+FakeMetadataSetKey<C_>::value() const
{
return _imp->collection;
}
-FakeMetadataKeywordCollectionKey::FakeMetadataKeywordCollectionKey(const std::string & r,
+FakeMetadataKeywordSetKey::FakeMetadataKeywordSetKey(const std::string & r,
const std::string & h, const std::string & v, const MetadataKeyType t) :
- FakeMetadataCollectionKey<KeywordNameCollection>(r, h, t)
+ FakeMetadataSetKey<KeywordNameSet>(r, h, t)
{
set_from_string(v);
}
void
-FakeMetadataKeywordCollectionKey::set_from_string(const std::string & s)
+FakeMetadataKeywordSetKey::set_from_string(const std::string & s)
{
- _imp->collection.reset(new KeywordNameCollection::Concrete);
+ _imp->collection.reset(new KeywordNameSet);
WhitespaceTokeniser::get_instance()->tokenise(s, create_inserter<KeywordName>(_imp->collection->inserter()));
}
-FakeMetadataIUseCollectionKey::FakeMetadataIUseCollectionKey(const std::string & r,
+FakeMetadataIUseSetKey::FakeMetadataIUseSetKey(const std::string & r,
const std::string & h, const std::string & v, const IUseFlagParseMode m, const MetadataKeyType t) :
- FakeMetadataCollectionKey<IUseFlagCollection>(r, h, t)
+ FakeMetadataSetKey<IUseFlagSet>(r, h, t)
{
set_from_string(v, m);
}
void
-FakeMetadataIUseCollectionKey::set_from_string(const std::string & s, const IUseFlagParseMode m)
+FakeMetadataIUseSetKey::set_from_string(const std::string & s, const IUseFlagParseMode m)
{
- _imp->collection.reset(new IUseFlagCollection::Concrete);
+ _imp->collection.reset(new IUseFlagSet);
std::list<std::string> tokens;
WhitespaceTokeniser::get_instance()->tokenise(s, std::back_inserter(tokens));
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
@@ -187,8 +189,8 @@ namespace paludis
tr1::shared_ptr<FakeMetadataPackageIDKey> package_id;
tr1::shared_ptr<FakeMetadataPackageIDKey> virtual_for;
- tr1::shared_ptr<FakeMetadataKeywordCollectionKey> keywords;
- tr1::shared_ptr<FakeMetadataIUseCollectionKey> iuse;
+ tr1::shared_ptr<FakeMetadataKeywordSetKey> keywords;
+ tr1::shared_ptr<FakeMetadataIUseSetKey> iuse;
tr1::shared_ptr<FakeMetadataSpecTreeKey<LicenseSpecTree> > license;
tr1::shared_ptr<FakeMetadataSpecTreeKey<ProvideSpecTree> > provide;
tr1::shared_ptr<FakeMetadataSpecTreeKey<DependencySpecTree> > build_dependencies;
@@ -207,8 +209,8 @@ namespace paludis
version(v),
slot("0"),
eapi(EAPIData::get_instance()->eapi_from_string("0")),
- keywords(new FakeMetadataKeywordCollectionKey("KEYWORDS", "Keywords", "test", mkt_normal)),
- iuse(new FakeMetadataIUseCollectionKey("IUSE", "Used USE flags", "", iuse_pm_permissive, mkt_normal)),
+ keywords(new FakeMetadataKeywordSetKey("KEYWORDS", "Keywords", "test", mkt_normal)),
+ iuse(new FakeMetadataIUseSetKey("IUSE", "Used USE flags", "", iuse_pm_permissive, mkt_normal)),
license(new FakeMetadataSpecTreeKey<LicenseSpecTree>("LICENSE", "Licenses",
"", tr1::bind(&PortageDepParser::parse_license, _1, tr1::cref(*eapi)), mkt_normal)),
provide(new FakeMetadataSpecTreeKey<ProvideSpecTree>("PROVIDE", "Provided packages",
@@ -302,28 +304,28 @@ FakePackageID::virtual_for_key() const
return _imp->virtual_for;
}
-const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >
FakePackageID::keywords_key() const
{
return _imp->keywords;
}
-const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >
+const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
FakePackageID::iuse_key() const
{
return _imp->iuse;
}
-const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >
+const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
FakePackageID::inherited_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
FakePackageID::use_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
}
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
@@ -368,13 +370,13 @@ FakePackageID::restrict_key() const
return _imp->restrictions;
}
-const tr1::shared_ptr<FakeMetadataKeywordCollectionKey>
+const tr1::shared_ptr<FakeMetadataKeywordSetKey>
FakePackageID::keywords_key()
{
return _imp->keywords;
}
-const tr1::shared_ptr<FakeMetadataIUseCollectionKey>
+const tr1::shared_ptr<FakeMetadataIUseSetKey>
FakePackageID::iuse_key()
{
return _imp->iuse;
@@ -493,6 +495,6 @@ template class FakeMetadataSpecTreeKey<DependencySpecTree>;
template class FakeMetadataSpecTreeKey<RestrictSpecTree>;
template class FakeMetadataSpecTreeKey<URISpecTree>;
-template class FakeMetadataCollectionKey<KeywordNameCollection>;
-template class FakeMetadataCollectionKey<IUseFlagCollection>;
+template class FakeMetadataSetKey<KeywordNameSet>;
+template class FakeMetadataSetKey<IUseFlagSet>;
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 76b5cdb3d..26b6c291a 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -29,35 +29,35 @@ namespace paludis
class FakeRepositoryBase;
template <typename C_>
- class PALUDIS_VISIBLE FakeMetadataCollectionKey :
- public MetadataCollectionKey<C_>,
- private PrivateImplementationPattern<FakeMetadataCollectionKey<C_> >
+ class PALUDIS_VISIBLE FakeMetadataSetKey :
+ public MetadataSetKey<C_>,
+ private PrivateImplementationPattern<FakeMetadataSetKey<C_> >
{
protected:
- Implementation<FakeMetadataCollectionKey> * const _imp;
+ Implementation<FakeMetadataSetKey> * const _imp;
- FakeMetadataCollectionKey(const std::string &, const std::string &, const MetadataKeyType);
+ FakeMetadataSetKey(const std::string &, const std::string &, const MetadataKeyType);
public:
- ~FakeMetadataCollectionKey();
+ ~FakeMetadataSetKey();
virtual const tr1::shared_ptr<const C_> value() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
- class PALUDIS_VISIBLE FakeMetadataKeywordCollectionKey :
- public FakeMetadataCollectionKey<KeywordNameCollection>
+ class PALUDIS_VISIBLE FakeMetadataKeywordSetKey :
+ public FakeMetadataSetKey<KeywordNameSet>
{
public:
- FakeMetadataKeywordCollectionKey(const std::string &, const std::string &, const std::string &, const MetadataKeyType);
+ FakeMetadataKeywordSetKey(const std::string &, const std::string &, const std::string &, const MetadataKeyType);
void set_from_string(const std::string &);
};
- class PALUDIS_VISIBLE FakeMetadataIUseCollectionKey :
- public FakeMetadataCollectionKey<IUseFlagCollection>
+ class PALUDIS_VISIBLE FakeMetadataIUseSetKey :
+ public FakeMetadataSetKey<IUseFlagSet>
{
public:
- FakeMetadataIUseCollectionKey(const std::string &, const std::string &, const std::string &, const IUseFlagParseMode,
+ FakeMetadataIUseSetKey(const std::string &, const std::string &, const std::string &, const IUseFlagParseMode,
const MetadataKeyType);
void set_from_string(const std::string &, const IUseFlagParseMode);
@@ -122,10 +122,10 @@ namespace paludis
virtual const tr1::shared_ptr<const EAPI> eapi() const;
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> > inherited_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
@@ -143,8 +143,8 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataStringKey> source_origin_key() const;
virtual const tr1::shared_ptr<const MetadataStringKey> binary_origin_key() const;
- const tr1::shared_ptr<FakeMetadataKeywordCollectionKey> keywords_key();
- const tr1::shared_ptr<FakeMetadataIUseCollectionKey> iuse_key();
+ const tr1::shared_ptr<FakeMetadataKeywordSetKey> keywords_key();
+ const tr1::shared_ptr<FakeMetadataIUseSetKey> iuse_key();
const tr1::shared_ptr<FakeMetadataSpecTreeKey<ProvideSpecTree> > provide_key();
const tr1::shared_ptr<FakeMetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key();
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 4518cbf62..d24b5de14 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -19,9 +19,9 @@
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
@@ -40,7 +40,7 @@ namespace paludis
tr1::shared_ptr<FakeRepository::VirtualsSequence> virtual_packages;
Implementation() :
- virtual_packages(new FakeRepository::VirtualsSequence::Concrete)
+ virtual_packages(new FakeRepository::VirtualsSequence)
{
}
};
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index e78cf4d07..71168c03d 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -20,11 +20,12 @@
#include <paludis/repositories/fake/fake_repository_base.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/eapi.hh>
#include <paludis/repository_info.hh>
@@ -52,10 +53,10 @@ namespace paludis
private InstantiationPolicy<Implementation<FakeRepositoryBase>, instantiation_method::NonCopyableTag>
{
/// Our category names.
- tr1::shared_ptr<CategoryNamePartCollection> category_names;
+ tr1::shared_ptr<CategoryNamePartSet> category_names;
/// Our package names.
- std::map<CategoryNamePart, tr1::shared_ptr<PackageNamePartCollection> > package_names;
+ std::map<CategoryNamePart, tr1::shared_ptr<PackageNamePartSet> > package_names;
/// Our IDs.
std::map<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> > ids;
@@ -70,7 +71,7 @@ namespace paludis
};
Implementation<FakeRepositoryBase>::Implementation(const Environment * const e) :
- category_names(new CategoryNamePartCollection::Concrete),
+ category_names(new CategoryNamePartSet),
env(e)
{
}
@@ -108,20 +109,20 @@ FakeRepositoryBase::do_has_package_named(const QualifiedPackageName & q) const
_imp->package_names.find(q.category)->second->find(q.package));
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
FakeRepositoryBase::do_category_names() const
{
return _imp->category_names;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
{
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
if (! has_category_named(c))
return result;
- PackageNamePartCollection::Iterator p(_imp->package_names.find(c)->second->begin()),
+ PackageNamePartSet::Iterator 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);
@@ -132,9 +133,9 @@ tr1::shared_ptr<const PackageIDSequence>
FakeRepositoryBase::do_package_ids(const QualifiedPackageName & n) const
{
if (! has_category_named(n.category))
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
if (! has_package_named(n))
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
return _imp->ids.find(n)->second;
}
@@ -142,7 +143,7 @@ void
FakeRepositoryBase::add_category(const CategoryNamePart & c)
{
_imp->category_names->insert(c);
- _imp->package_names.insert(std::make_pair(c, new PackageNamePartCollection::Concrete));
+ _imp->package_names.insert(std::make_pair(c, new PackageNamePartSet));
}
void
@@ -150,7 +151,7 @@ FakeRepositoryBase::add_package(const QualifiedPackageName & q)
{
add_category(q.category);
_imp->package_names.find(q.category)->second->insert(q.package);
- _imp->ids.insert(std::make_pair(q, new PackageIDSequence::Concrete));
+ _imp->ids.insert(std::make_pair(q, new PackageIDSequence));
}
tr1::shared_ptr<FakePackageID>
@@ -192,10 +193,10 @@ FakeRepositoryBase::do_query_use_force(const UseFlagName &, const PackageID &) c
return false;
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
FakeRepositoryBase::do_arch_flags() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
void
@@ -203,22 +204,22 @@ FakeRepositoryBase::invalidate()
{
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
FakeRepositoryBase::do_use_expand_flags() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
FakeRepositoryBase::do_use_expand_hidden_prefixes() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
-tr1::shared_ptr<const UseFlagNameCollection>
+tr1::shared_ptr<const UseFlagNameSet>
FakeRepositoryBase::do_use_expand_prefixes() const
{
- return tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
+ return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
void
@@ -237,10 +238,10 @@ FakeRepositoryBase::do_package_set(const SetName & id) const
return i->second;
}
-tr1::shared_ptr<const SetNameCollection>
+tr1::shared_ptr<const SetNameSet>
FakeRepositoryBase::sets_list() const
{
- tr1::shared_ptr<SetNameCollection> result(new SetNameCollection::Concrete);
+ tr1::shared_ptr<SetNameSet> result(new SetNameSet);
std::copy(_imp->sets.begin(), _imp->sets.end(), transform_inserter(result->inserter(),
tr1::mem_fn(&std::pair<const SetName, tr1::shared_ptr<SetSpecTree::ConstItem> >::first)));
return result;
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index ef0539f7c..da07a7128 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -75,16 +75,16 @@ namespace paludis
virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_arch_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_flags() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_hidden_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_prefixes() const
+ virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string do_describe_use_flag(const UseFlagName &,
@@ -96,7 +96,7 @@ namespace paludis
virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const SetNameCollection> sets_list() const
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const
PALUDIS_ATTRIBUTE((warn_unused_result));
/* Repository */
@@ -105,11 +105,11 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
diff --git a/paludis/repositories/repository_maker.cc b/paludis/repositories/repository_maker.cc
index 602547728..8b9323c4e 100644
--- a/paludis/repositories/repository_maker.cc
+++ b/paludis/repositories/repository_maker.cc
@@ -23,6 +23,7 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
+#include <paludis/util/map.hh>
#include <paludis/util/system.hh>
#include <paludis/util/virtual_constructor-impl.hh>
#include <paludis/about.hh>
@@ -43,7 +44,7 @@ using namespace paludis;
template class VirtualConstructor<std::string,
tr1::shared_ptr<Repository> (*) (Environment * const,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >),
+ tr1::shared_ptr<const Map<std::string, std::string> >),
virtual_constructor_not_found::ThrowException<NoSuchRepositoryTypeError> >;
template class InstantiationPolicy<RepositoryMaker, instantiation_method::SingletonTag>;
diff --git a/paludis/repositories/repository_maker.hh b/paludis/repositories/repository_maker.hh
index 3d8ff6dcf..a3a4de2b7 100644
--- a/paludis/repositories/repository_maker.hh
+++ b/paludis/repositories/repository_maker.hh
@@ -23,6 +23,7 @@
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/virtual_constructor.hh>
+#include <paludis/util/map-fwd.hh>
#include <paludis/repository.hh>
namespace paludis
@@ -93,7 +94,7 @@ namespace paludis
class PALUDIS_VISIBLE RepositoryMaker :
public VirtualConstructor<std::string,
tr1::shared_ptr<Repository> (*) (Environment * const,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >),
+ tr1::shared_ptr<const Map<std::string, std::string> >),
virtual_constructor_not_found::ThrowException<NoSuchRepositoryTypeError> >,
public InstantiationPolicy<RepositoryMaker, instantiation_method::SingletonTag>,
private PrivateImplementationPattern<RepositoryMaker>
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 6e81657d4..c88e17fd3 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -26,10 +26,12 @@
#include <paludis/package_database.hh>
#include <paludis/repository_info.hh>
#include <paludis/util/make_shared_ptr.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/map.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
@@ -152,7 +154,7 @@ InstalledVirtualsRepository::need_ids() const
{
IDMap::iterator i(_imp->ids.find(p->virtual_name));
if (i == _imp->ids.end())
- i = _imp->ids.insert(std::make_pair(p->virtual_name, make_shared_ptr(new PackageIDSequence::Concrete))).first;
+ i = _imp->ids.insert(std::make_pair(p->virtual_name, make_shared_ptr(new PackageIDSequence))).first;
tr1::shared_ptr<const PackageID> id(new virtuals::VirtualsPackageID(shared_from_this(), p->virtual_name, p->provided_by));
i->second->push_back(id);
@@ -165,7 +167,7 @@ InstalledVirtualsRepository::need_ids() const
tr1::shared_ptr<Repository>
InstalledVirtualsRepository::make_installed_virtuals_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > k)
+ tr1::shared_ptr<const Map<std::string, std::string> > k)
{
std::string root_str;
@@ -182,36 +184,36 @@ tr1::shared_ptr<const PackageIDSequence>
InstalledVirtualsRepository::do_package_ids(const QualifiedPackageName & q) const
{
if (q.category.data() != "virtual")
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
need_ids();
IDMap::const_iterator i(_imp->ids.find(q));
if (i == _imp->ids.end())
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
return i->second;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
InstalledVirtualsRepository::do_package_names(const CategoryNamePart & c) const
{
if (c.data() != "virtual")
- return tr1::shared_ptr<QualifiedPackageNameCollection>(new QualifiedPackageNameCollection::Concrete);
+ return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
need_ids();
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
std::copy(_imp->ids.begin(), _imp->ids.end(), transform_inserter(result->inserter(),
tr1::mem_fn(&std::pair<const QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::first)));
return result;
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
InstalledVirtualsRepository::do_category_names() const
{
- tr1::shared_ptr<CategoryNamePartCollection> result(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("virtual"));
return result;
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 00d5f35be..db4813ee9 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -22,6 +22,8 @@
#include <paludis/repository.hh>
#include <paludis/util/tr1_memory.hh>
+#include <paludis/util/map-fwd.hh>
+#include <paludis/util/sequence-fwd.hh>
namespace paludis
{
@@ -51,11 +53,11 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
@@ -80,7 +82,7 @@ namespace paludis
*/
static tr1::shared_ptr<Repository> make_installed_virtuals_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >);
+ tr1::shared_ptr<const Map<std::string, std::string> >);
virtual void invalidate();
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index ce6fce99f..5cf0f113b 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -210,28 +210,28 @@ VirtualsPackageID::virtual_for_key() const
return _imp->virtual_for;
}
-const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >
VirtualsPackageID::keywords_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >
+const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
VirtualsPackageID::iuse_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >
+const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
VirtualsPackageID::inherited_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
VirtualsPackageID::use_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
}
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
diff --git a/paludis/repositories/virtuals/package_id.hh b/paludis/repositories/virtuals/package_id.hh
index bbdd33d62..535196fe7 100644
--- a/paludis/repositories/virtuals/package_id.hh
+++ b/paludis/repositories/virtuals/package_id.hh
@@ -86,10 +86,10 @@ namespace paludis
virtual const tr1::shared_ptr<const EAPI> eapi() const;
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> > inherited_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
+ virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 97da1b8bf..b8c255e3d 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -27,12 +27,14 @@
#include <paludis/query.hh>
#include <paludis/repository_info.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/operators.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tr1_functional.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
#include <vector>
#include <utility>
@@ -211,7 +213,7 @@ VirtualsRepository::need_ids() const
{
IDMap::iterator i(_imp->ids.find(v->first));
if (_imp->ids.end() == i)
- i = _imp->ids.insert(std::make_pair(v->first, make_shared_ptr(new PackageIDSequence::Concrete))).first;
+ i = _imp->ids.insert(std::make_pair(v->first, make_shared_ptr(new PackageIDSequence))).first;
tr1::shared_ptr<const PackageID> id(make_virtual_package_id(QualifiedPackageName(v->first), *m));
if (stringify(id->name().category) != "virtual")
@@ -226,7 +228,7 @@ VirtualsRepository::need_ids() const
tr1::shared_ptr<Repository>
VirtualsRepository::make_virtuals_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >)
+ tr1::shared_ptr<const Map<std::string, std::string> >)
{
return tr1::shared_ptr<Repository>(new VirtualsRepository(env));
}
@@ -235,36 +237,36 @@ tr1::shared_ptr<const PackageIDSequence>
VirtualsRepository::do_package_ids(const QualifiedPackageName & q) const
{
if (q.category.data() != "virtual")
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
need_ids();
IDMap::const_iterator i(_imp->ids.find(q));
if (i == _imp->ids.end())
- return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence::Concrete);
+ return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
return i->second;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
VirtualsRepository::do_package_names(const CategoryNamePart & c) const
{
if (c.data() != "virtual")
- return tr1::shared_ptr<QualifiedPackageNameCollection>(new QualifiedPackageNameCollection::Concrete);
+ return tr1::shared_ptr<QualifiedPackageNameSet>(new QualifiedPackageNameSet);
need_ids();
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
std::copy(_imp->ids.begin(), _imp->ids.end(), transform_inserter(result->inserter(),
tr1::mem_fn(&std::pair<const QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::first)));
return result;
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
VirtualsRepository::do_category_names() const
{
- tr1::shared_ptr<CategoryNamePartCollection> result(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("virtual"));
return result;
}
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index 9e9a6bca5..872b1cfc2 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -22,6 +22,7 @@
#include <paludis/repository.hh>
#include <paludis/util/tr1_memory.hh>
+#include <paludis/util/map-fwd.hh>
namespace paludis
{
@@ -52,11 +53,11 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
@@ -86,7 +87,7 @@ namespace paludis
*/
static tr1::shared_ptr<Repository> make_virtuals_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >);
+ tr1::shared_ptr<const Map<std::string, std::string> >);
virtual void invalidate();
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index 901b58fc2..3d3b1c39e 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -26,6 +26,7 @@
#include <paludis/repositories/virtuals/virtuals_repository.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/package_database.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/query.hh>