aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-16 09:17:23 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-16 09:17:23 +0000
commit830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5 (patch)
tree1b486967b2b840ea87a8fbf311c13a823540116e /paludis/repositories/fake
parent169e91b611f2a12b89467e03abb4c76ddbe3fe7e (diff)
downloadpaludis-830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5.tar.gz
paludis-830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5.tar.xz
Merge various metadata key things.
Diffstat (limited to 'paludis/repositories/fake')
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc12
-rw-r--r--paludis/repositories/fake/fake_installed_repository.hh6
-rw-r--r--paludis/repositories/fake/fake_package_id.cc42
-rw-r--r--paludis/repositories/fake/fake_package_id.hh22
-rw-r--r--paludis/repositories/fake/fake_repository.cc10
-rw-r--r--paludis/repositories/fake/fake_repository.hh6
6 files changed, 49 insertions, 49 deletions
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 43cb6b21c..be66ce9f9 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -39,13 +39,13 @@ namespace paludis
template <>
struct Implementation<FakeInstalledRepository>
{
- tr1::shared_ptr<const MetadataStringKey> format_key;
- tr1::shared_ptr<const MetadataFSEntryKey> installed_root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key;
Implementation() :
- format_key(new LiteralMetadataStringKey(
+ format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "installed_fake")),
- installed_root_key(new LiteralMetadataFSEntryKey(
+ installed_root_key(new LiteralMetadataValueKey<FSEntry> (
"installed_root", "installed_root", mkt_normal, FSEntry("/")))
{
}
@@ -188,13 +188,13 @@ FakeInstalledRepository::some_ids_might_support_action(const SupportsActionTestB
return q.result;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
FakeInstalledRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
FakeInstalledRepository::installed_root_key() const
{
return _imp->installed_root_key;
diff --git a/paludis/repositories/fake/fake_installed_repository.hh b/paludis/repositories/fake/fake_installed_repository.hh
index 6a99f9a4a..b51916ca4 100644
--- a/paludis/repositories/fake/fake_installed_repository.hh
+++ b/paludis/repositories/fake/fake_installed_repository.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -69,8 +69,8 @@ namespace paludis
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
/* Keys */
- virtual const tr1::shared_ptr<const MetadataStringKey> format_key() const;
- virtual const tr1::shared_ptr<const MetadataFSEntryKey> installed_root_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key() const;
};
}
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 9a985d0f2..eaffb75e9 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -371,8 +371,8 @@ namespace paludis
mutable tr1::shared_ptr<DependencyLabelSequence> post_dependencies_labels;
mutable tr1::shared_ptr<DependencyLabelSequence> suggested_dependencies_labels;
- tr1::shared_ptr<LiteralMetadataPackageIDKey> package_id;
- tr1::shared_ptr<LiteralMetadataPackageIDKey> virtual_for;
+ tr1::shared_ptr<LiteralMetadataValueKey<tr1::shared_ptr<const PackageID> > > package_id;
+ tr1::shared_ptr<LiteralMetadataValueKey<tr1::shared_ptr<const PackageID> > > virtual_for;
tr1::shared_ptr<FakeMetadataKeywordSetKey> keywords;
tr1::shared_ptr<FakeMetadataIUseSetKey> iuse;
tr1::shared_ptr<FakeMetadataSpecTreeKey<LicenseSpecTree> > license;
@@ -472,7 +472,7 @@ FakePackageID::repository() const
return _imp->repository;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
FakePackageID::virtual_for_key() const
{
need_keys_added();
@@ -612,25 +612,25 @@ FakePackageID::homepage_key()
return _imp->homepage;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
FakePackageID::short_description_key() const
{
need_keys_added();
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
FakePackageID::long_description_key() const
{
need_keys_added();
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
-const tr1::shared_ptr<const MetadataContentsKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >
FakePackageID::contents_key() const
{
need_keys_added();
- return tr1::shared_ptr<const MetadataContentsKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >();
}
const tr1::shared_ptr<const MetadataTimeKey>
@@ -640,18 +640,18 @@ FakePackageID::installed_time_key() const
return tr1::shared_ptr<const MetadataTimeKey>();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
FakePackageID::source_origin_key() const
{
need_keys_added();
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
FakePackageID::binary_origin_key() const
{
need_keys_added();
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
void
@@ -924,28 +924,28 @@ FakePackageID::contains_key() const
return tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> >();
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
FakePackageID::contained_in_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
FakePackageID::fs_location_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
FakePackageID::size_of_download_required_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
FakePackageID::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
char
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 473f7e457..787bd2db1 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -202,7 +202,7 @@ namespace paludis
virtual const SlotName slot() const;
virtual const tr1::shared_ptr<const Repository> repository() const;
- virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > > virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
@@ -212,17 +212,17 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > suggested_dependencies_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > fetches_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const;
- virtual const tr1::shared_ptr<const MetadataStringKey> short_description_key() const;
- virtual const tr1::shared_ptr<const MetadataStringKey> long_description_key() const;
- virtual const tr1::shared_ptr<const MetadataContentsKey> contents_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const tr1::shared_ptr<const MetadataStringKey> source_origin_key() const;
- virtual const tr1::shared_ptr<const MetadataStringKey> binary_origin_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
- virtual const tr1::shared_ptr<const MetadataPackageIDKey> contained_in_key() const;
- virtual const tr1::shared_ptr<const MetadataFSEntryKey> fs_location_key() const;
- virtual const tr1::shared_ptr<const MetadataSizeKey> size_of_download_required_key() const;
- virtual const tr1::shared_ptr<const MetadataSizeKey> size_of_all_distfiles_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > > contained_in_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<long> > size_of_download_required_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<long> > size_of_all_distfiles_key() const;
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
const tr1::shared_ptr<FakeMetadataKeywordSetKey> keywords_key();
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 28f3c6f5c..35d092ba3 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -45,11 +45,11 @@ namespace paludis
tr1::shared_ptr<FakeRepository::VirtualsSequence> virtual_packages;
std::map<std::string, std::string> mirrors;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation() :
virtual_packages(new FakeRepository::VirtualsSequence),
- format_key(new LiteralMetadataStringKey(
+ format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "fake"))
{
mirrors.insert(std::make_pair("example", "http://fake-example/fake-example/"));
@@ -199,15 +199,15 @@ FakeRepository::end_mirrors(const std::string & s) const
return MirrorsConstIterator(_imp->mirrors.equal_range(s).second);
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
FakeRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
FakeRepository::installed_root_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index 65ff6daec..c0df74c2a 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -74,8 +74,8 @@ namespace paludis
/* Keys */
- virtual const tr1::shared_ptr<const MetadataStringKey> format_key() const;
- virtual const tr1::shared_ptr<const MetadataFSEntryKey> installed_root_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key() const;
};
}