aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
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
parent169e91b611f2a12b89467e03abb4c76ddbe3fe7e (diff)
downloadpaludis-830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5.tar.gz
paludis-830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5.tar.xz
Merge various metadata key things.
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc18
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh6
-rw-r--r--paludis/repositories/cran/cran_package_id.cc64
-rw-r--r--paludis/repositories/cran/cran_package_id.hh22
-rw-r--r--paludis/repositories/cran/cran_repository.cc32
-rw-r--r--paludis/repositories/cran/cran_repository.hh6
-rw-r--r--paludis/repositories/cran/keys.cc19
-rw-r--r--paludis/repositories/cran/keys.hh7
-rw-r--r--paludis/repositories/e/conditional_dep_spec.cc8
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc88
-rw-r--r--paludis/repositories/e/e_installed_repository_id.hh22
-rw-r--r--paludis/repositories/e/e_key.cc8
-rw-r--r--paludis/repositories/e/e_key.hh10
-rw-r--r--paludis/repositories/e/e_repository.cc102
-rw-r--r--paludis/repositories/e/e_repository.hh6
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc4
-rw-r--r--paludis/repositories/e/ebuild_id.cc44
-rw-r--r--paludis/repositories/e/ebuild_id.hh20
-rw-r--r--paludis/repositories/e/exndbam_id.cc6
-rw-r--r--paludis/repositories/e/exndbam_id.hh2
-rw-r--r--paludis/repositories/e/exndbam_repository.cc24
-rw-r--r--paludis/repositories/e/exndbam_repository.hh4
-rw-r--r--paludis/repositories/e/pipe_command_handler.cc6
-rw-r--r--paludis/repositories/e/qa/metadata_keys.cc14
-rw-r--r--paludis/repositories/e/qa/spec_keys.cc12
-rw-r--r--paludis/repositories/e/vdb_id.cc2
-rw-r--r--paludis/repositories/e/vdb_id.hh2
-rw-r--r--paludis/repositories/e/vdb_repository.cc32
-rw-r--r--paludis/repositories/e/vdb_repository.hh4
-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
-rw-r--r--paludis/repositories/gems/gem_specification.cc54
-rw-r--r--paludis/repositories/gems/gem_specification.hh20
-rw-r--r--paludis/repositories/gems/gem_specification_TEST.cc6
-rw-r--r--paludis/repositories/gems/gems_repository.cc32
-rw-r--r--paludis/repositories/gems/gems_repository.hh6
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc22
-rw-r--r--paludis/repositories/gems/installed_gems_repository.hh6
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc42
-rw-r--r--paludis/repositories/unpackaged/installed_id.hh20
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc17
-rw-r--r--paludis/repositories/unpackaged/installed_repository.hh6
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc44
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.hh22
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc36
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh6
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc14
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh6
-rw-r--r--paludis/repositories/virtuals/package_id.cc44
-rw-r--r--paludis/repositories/virtuals/package_id.hh22
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc12
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh6
56 files changed, 577 insertions, 558 deletions
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 67818f6b8..2e8db04b8 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006, 2007 Danny van Dyk
- * 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
@@ -68,18 +68,18 @@ namespace paludis
Implementation(const CRANInstalledRepositoryParams &);
~Implementation();
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataFSEntryKey> installed_root_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
};
}
Implementation<CRANInstalledRepository>::Implementation(const CRANInstalledRepositoryParams & p) :
params(p),
has_ids(false),
- location_key(new LiteralMetadataFSEntryKey("location", "location", mkt_significant, params.location)),
- installed_root_key(new LiteralMetadataFSEntryKey("root", "root", mkt_normal, params.root)),
- format_key(new LiteralMetadataStringKey("format", "format", mkt_significant, "installed_cran"))
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location", mkt_significant, params.location)),
+ installed_root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root", mkt_normal, params.root)),
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format", mkt_significant, "installed_cran"))
{
}
@@ -667,13 +667,13 @@ CRANInstalledRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
CRANInstalledRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
CRANInstalledRepository::installed_root_key() const
{
return _imp->installed_root_key;
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index 1945b6109..d3f784096 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006 Danny van Dyk
- * 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
@@ -136,8 +136,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;
};
/**
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index f00aeca17..dedde5079 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006, 2007 Danny van Dyk
- * 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
@@ -63,11 +63,11 @@ namespace paludis
QualifiedPackageName name;
VersionSpec version;
- tr1::shared_ptr<LiteralMetadataFSEntryKey> fs_location_key;
- tr1::shared_ptr<LiteralMetadataStringKey> url_key;
- tr1::shared_ptr<LiteralMetadataStringKey> short_description_key;
- tr1::shared_ptr<LiteralMetadataStringKey> long_description_key;
- tr1::shared_ptr<LiteralMetadataStringKey> license_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<FSEntry> > fs_location_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > url_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > short_description_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > long_description_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > license_key;
tr1::shared_ptr<PackageIDKey> contained_in_key;
tr1::shared_ptr<PackageIDSequenceKey> contains_key;
tr1::shared_ptr<DepKey> depends_key;
@@ -122,7 +122,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const tr1::shared_pt
return;
}
- _imp->fs_location_key.reset(new LiteralMetadataFSEntryKey("DescriptionFileLocation", "Description File Location",
+ _imp->fs_location_key.reset(new LiteralMetadataValueKey<FSEntry> ("DescriptionFileLocation", "Description File Location",
mkt_internal, f));
add_metadata_key(_imp->fs_location_key);
@@ -168,7 +168,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const tr1::shared_pt
{
/* License often isn't in the format the spec requires, so we can't parse it. */
Context local_context("When handling License: key:");
- _imp->license_key.reset(new LiteralMetadataStringKey("License", "License", mkt_dependencies, file.get("License")));
+ _imp->license_key.reset(new LiteralMetadataValueKey<std::string>("License", "License", mkt_dependencies, file.get("License")));
add_metadata_key(_imp->license_key);
}
@@ -176,27 +176,27 @@ CRANPackageID::CRANPackageID(const Environment * const env, const tr1::shared_pt
{
/* URL is also in stupid formats */
Context local_context("When handling URL: key:");
- _imp->url_key.reset(new LiteralMetadataStringKey("URL", "URL", mkt_significant, file.get("URL")));
+ _imp->url_key.reset(new LiteralMetadataValueKey<std::string>("URL", "URL", mkt_significant, file.get("URL")));
add_metadata_key(_imp->url_key);
}
if (! file.get("Title").empty())
{
Context local_context("When handling Title: key:");
- _imp->short_description_key.reset(new LiteralMetadataStringKey("Title", "Title", mkt_significant, file.get("Title")));
+ _imp->short_description_key.reset(new LiteralMetadataValueKey<std::string>("Title", "Title", mkt_significant, file.get("Title")));
add_metadata_key(_imp->short_description_key);
}
if (! file.get("Description").empty())
{
Context local_context("When handling Description: key:");
- _imp->long_description_key.reset(new LiteralMetadataStringKey("Description", "Description", mkt_normal, file.get("Description")));
+ _imp->long_description_key.reset(new LiteralMetadataValueKey<std::string>("Description", "Description", mkt_normal, file.get("Description")));
add_metadata_key(_imp->long_description_key);
}
else if (! file.get("BundleDescription").empty())
{
Context local_context("When handling BundleDescription: key:");
- _imp->long_description_key.reset(new LiteralMetadataStringKey("BundleDescription", "Bundle Description",
+ _imp->long_description_key.reset(new LiteralMetadataValueKey<std::string>("BundleDescription", "Bundle Description",
mkt_normal, file.get("BundleDescription")));
}
@@ -204,19 +204,19 @@ CRANPackageID::CRANPackageID(const Environment * const env, const tr1::shared_pt
{
Context local_context("When handling Date: key:");
/* no guarantee on the format */
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("Date", "Date", mkt_normal, file.get("Date"))));
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("Date", "Date", mkt_normal, file.get("Date"))));
}
if (! file.get("Author").empty())
{
Context local_context("When handling Author: key:");
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("Author", "Author", mkt_author, file.get("Author"))));
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("Author", "Author", mkt_author, file.get("Author"))));
}
if (! file.get("Maintainer").empty())
{
Context local_context("When handling Maintainer: key:");
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("Maintainer", "Maintainer", mkt_author, file.get("Maintainer"))));
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("Maintainer", "Maintainer", mkt_author, file.get("Maintainer"))));
}
if (! file.get("Contains").empty())
@@ -251,7 +251,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const tr1::shared_pt
if (! file.get("SystemRequirements").empty())
{
Context local_context("When handling SystemRequirements: key:");
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("SystemRequirements", "System Requirements", mkt_normal,
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string>("SystemRequirements", "System Requirements", mkt_normal,
file.get("SystemRequirements"))));
}
@@ -322,10 +322,10 @@ CRANPackageID::repository() const
return _imp->repository;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
CRANPackageID::virtual_for_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
@@ -382,22 +382,22 @@ CRANPackageID::homepage_key() const
return tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
CRANPackageID::short_description_key() const
{
return _imp->short_description_key;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
CRANPackageID::long_description_key() const
{
return _imp->long_description_key;
}
-const tr1::shared_ptr<const MetadataContentsKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >
CRANPackageID::contents_key() const
{
- return tr1::shared_ptr<const MetadataContentsKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >();
}
const tr1::shared_ptr<const MetadataTimeKey>
@@ -406,16 +406,16 @@ CRANPackageID::installed_time_key() const
return tr1::shared_ptr<const MetadataTimeKey>();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
CRANPackageID::source_origin_key() const
{
- 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> >
CRANPackageID::binary_origin_key() const
{
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
std::size_t
@@ -525,26 +525,26 @@ CRANPackageID::contains_key() const
return _imp->contains_key;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
CRANPackageID::contained_in_key() const
{
return _imp->contained_in_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
CRANPackageID::fs_location_key() const
{
return _imp->fs_location_key;
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
CRANPackageID::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> >
CRANPackageID::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
diff --git a/paludis/repositories/cran/cran_package_id.hh b/paludis/repositories/cran/cran_package_id.hh
index 5f50ae552..e19649db5 100644
--- a/paludis/repositories/cran/cran_package_id.hh
+++ b/paludis/repositories/cran/cran_package_id.hh
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006 Danny van Dyk
- * 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
@@ -57,7 +57,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;
@@ -67,17 +67,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;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 20d12145a..28ade0566 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006, 2007 Danny van Dyk
- * 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
@@ -70,12 +70,12 @@ namespace paludis
Implementation(const CRANRepositoryParams &, const tr1::shared_ptr<Mutex> &);
~Implementation();
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataFSEntryKey> distdir_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
- tr1::shared_ptr<const MetadataFSEntryKey> builddir_key;
- tr1::shared_ptr<const MetadataFSEntryKey> library_key;
- tr1::shared_ptr<const MetadataStringKey> sync_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > distdir_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > library_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > sync_key;
};
}
@@ -83,12 +83,12 @@ Implementation<CRANRepository>::Implementation(const CRANRepositoryParams & p, c
params(p),
big_nasty_mutex(m),
has_ids(false),
- location_key(new LiteralMetadataFSEntryKey("location", "location", mkt_significant, params.location)),
- distdir_key(new LiteralMetadataFSEntryKey("distdir", "distdir", mkt_normal, params.distdir)),
- format_key(new LiteralMetadataStringKey("format", "format", mkt_significant, "cran")),
- builddir_key(new LiteralMetadataFSEntryKey("builddir", "builddir", mkt_normal, params.builddir)),
- library_key(new LiteralMetadataFSEntryKey("library", "library", mkt_normal, params.library)),
- sync_key(new LiteralMetadataStringKey("sync", "sync", mkt_normal, params.sync))
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location", mkt_significant, params.location)),
+ distdir_key(new LiteralMetadataValueKey<FSEntry> ("distdir", "distdir", mkt_normal, params.distdir)),
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format", mkt_significant, "cran")),
+ builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir", mkt_normal, params.builddir)),
+ library_key(new LiteralMetadataValueKey<FSEntry> ("library", "library", mkt_normal, params.library)),
+ sync_key(new LiteralMetadataValueKey<std::string> ("sync", "sync", mkt_normal, params.sync))
{
}
@@ -515,15 +515,15 @@ CRANRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
CRANRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
CRANRepository::installed_root_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index 2355eeb53..b76eb9488 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006 Danny van Dyk
- * 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
@@ -123,8 +123,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;
};
/**
diff --git a/paludis/repositories/cran/keys.cc b/paludis/repositories/cran/keys.cc
index edced01ff..6a5246529 100644
--- a/paludis/repositories/cran/keys.cc
+++ b/paludis/repositories/cran/keys.cc
@@ -32,6 +32,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/stringify_formatter-impl.hh>
#include <paludis/formatter.hh>
+#include <paludis/action.hh>
using namespace paludis;
using namespace paludis::cranrepository;
@@ -68,7 +69,7 @@ PackageIDSequenceKey::pretty_print_flat(const Formatter<PackageID> & f) const
PackageIDKey::PackageIDKey(const std::string & r, const std::string & h,
const CRANPackageID * const v, const MetadataKeyType t) :
- MetadataPackageIDKey(r, h, t),
+ MetadataValueKey<tr1::shared_ptr<const PackageID> >(r, h, t),
_v(v)
{
}
@@ -79,6 +80,22 @@ PackageIDKey::value() const
return _v->shared_from_this();
}
+std::string
+PackageIDKey::pretty_print(const Formatter<PackageID> & f) const
+{
+ if (_v->supports_action(SupportsActionTest<InstalledAction>()))
+ return f.format(*_v, format::Installed());
+ else if (_v->supports_action(SupportsActionTest<InstallAction>()))
+ {
+ if (_v->masked())
+ return f.format(*_v, format::Plain());
+ else
+ return f.format(*_v, format::Installable());
+ }
+ else
+ return f.format(*_v, format::Plain());
+}
+
namespace paludis
{
template <>
diff --git a/paludis/repositories/cran/keys.hh b/paludis/repositories/cran/keys.hh
index 3c5b211aa..61805289e 100644
--- a/paludis/repositories/cran/keys.hh
+++ b/paludis/repositories/cran/keys.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
@@ -52,7 +52,7 @@ namespace paludis
};
class PackageIDKey :
- public MetadataPackageIDKey
+ public MetadataValueKey<tr1::shared_ptr<const PackageID> >
{
private:
const CRANPackageID * const _v;
@@ -62,6 +62,9 @@ namespace paludis
virtual const tr1::shared_ptr<const PackageID> value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual std::string pretty_print(const Formatter<PackageID> &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
class DepKey :
diff --git a/paludis/repositories/e/conditional_dep_spec.cc b/paludis/repositories/e/conditional_dep_spec.cc
index 33dfe38ee..3ec276f63 100644
--- a/paludis/repositories/e/conditional_dep_spec.cc
+++ b/paludis/repositories/e/conditional_dep_spec.cc
@@ -67,8 +67,8 @@ namespace
flag = UseFlagName(s.substr(inverse ? 1 : 0, s.length() - (inverse ? 2 : 1)));
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("Flag", "Flag", mkt_normal, stringify(flag))));
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("Inverse", "Inverse", mkt_normal, stringify(inverse))));
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string> ("Flag", "Flag", mkt_normal, stringify(flag))));
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string> ("Inverse", "Inverse", mkt_normal, stringify(inverse))));
}
virtual std::string as_string() const
@@ -118,7 +118,7 @@ paludis::erepository::conditional_dep_spec_flag(const ConditionalDepSpec & spec)
ConditionalDepSpec::MetadataConstIterator i(spec.find_metadata("Flag"));
if (i == spec.end_metadata())
throw InternalError(PALUDIS_HERE, "Spec '" + stringify(spec) + "' has no Flag metadata");
- const MetadataStringKey * key(visitor_cast<const MetadataStringKey>(**i));
+ const MetadataValueKey<std::string> * key(visitor_cast<const MetadataValueKey<std::string> >(**i));
if (! key)
throw InternalError(PALUDIS_HERE, "Spec '" + stringify(spec) + "' has Flag metadata which is not a string");
return UseFlagName(key->value());
@@ -130,7 +130,7 @@ paludis::erepository::conditional_dep_spec_is_inverse(const ConditionalDepSpec &
ConditionalDepSpec::MetadataConstIterator i(spec.find_metadata("Inverse"));
if (i == spec.end_metadata())
throw InternalError(PALUDIS_HERE, "Spec '" + stringify(spec) + "' has no Inverse metadata");
- const MetadataStringKey * key(visitor_cast<const MetadataStringKey>(**i));
+ const MetadataValueKey<std::string> * key(visitor_cast<const MetadataValueKey<std::string> >(**i));
if (! key)
throw InternalError(PALUDIS_HERE, "Spec '" + stringify(spec) + "' has Inverse metadata which is not a string");
return destringify<bool>(key->value());
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index e1545997a..b69f5b399 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -76,7 +76,7 @@ namespace paludis
tr1::shared_ptr<const SlotName> slot;
tr1::shared_ptr<const EAPI> eapi;
- tr1::shared_ptr<const MetadataFSEntryKey> fs_location;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location;
tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> > use;
tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > inherited;
tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse;
@@ -88,21 +88,21 @@ namespace paludis
tr1::shared_ptr<const MetadataSpecTreeKey<RestrictSpecTree> > restrictions;
tr1::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > src_uri;
tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage;
- tr1::shared_ptr<const MetadataStringKey> short_description;
- tr1::shared_ptr<const MetadataContentsKey> contents;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > short_description;
+ tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > > contents;
tr1::shared_ptr<const MetadataTimeKey> installed_time;
- tr1::shared_ptr<const MetadataStringKey> source_origin;
- tr1::shared_ptr<const MetadataStringKey> binary_origin;
-
- tr1::shared_ptr<const MetadataStringKey> asflags;
- tr1::shared_ptr<const MetadataStringKey> cbuild;
- tr1::shared_ptr<const MetadataStringKey> cflags;
- tr1::shared_ptr<const MetadataStringKey> chost;
- tr1::shared_ptr<const MetadataStringKey> ctarget;
- tr1::shared_ptr<const MetadataStringKey> cxxflags;
- tr1::shared_ptr<const MetadataStringKey> ldflags;
- tr1::shared_ptr<const MetadataStringKey> pkgmanager;
- tr1::shared_ptr<const MetadataStringKey> vdb_format;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin;
+
+ tr1::shared_ptr<const MetadataValueKey<std::string> > asflags;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > cbuild;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > cflags;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > chost;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > ctarget;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > cxxflags;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > ldflags;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > pkgmanager;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > vdb_format;
tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
@@ -155,7 +155,7 @@ EInstalledRepositoryID::need_keys_added() const
// at the top, other keys use it.
if (! _imp->fs_location)
{
- _imp->fs_location.reset(new LiteralMetadataFSEntryKey(fs_location_raw_name(), fs_location_human_name(),
+ _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> (fs_location_raw_name(), fs_location_human_name(),
mkt_internal, _imp->dir));
add_metadata_key(_imp->fs_location);
}
@@ -286,7 +286,7 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->metadata_description.empty())
if ((_imp->dir / vars->metadata_description).exists())
{
- _imp->short_description.reset(new LiteralMetadataStringKey(vars->metadata_description,
+ _imp->short_description.reset(new LiteralMetadataValueKey<std::string> (vars->metadata_description,
vars->description_description, mkt_significant, file_contents(_imp->dir / vars->metadata_description)));
add_metadata_key(_imp->short_description);
}
@@ -308,76 +308,76 @@ EInstalledRepositoryID::need_keys_added() const
if ((_imp->dir / "REPOSITORY").exists())
{
- _imp->source_origin.reset(new LiteralMetadataStringKey("REPOSITORY", "Source repository",
+ _imp->source_origin.reset(new LiteralMetadataValueKey<std::string> ("REPOSITORY", "Source repository",
mkt_normal, file_contents(_imp->dir / "REPOSITORY")));
add_metadata_key(_imp->source_origin);
}
else if ((_imp->dir / "repository").exists())
{
- _imp->source_origin.reset(new LiteralMetadataStringKey("repository", "Source repository",
+ _imp->source_origin.reset(new LiteralMetadataValueKey<std::string> ("repository", "Source repository",
mkt_normal, file_contents(_imp->dir / "repository")));
add_metadata_key(_imp->source_origin);
}
if ((_imp->dir / "BINARY_REPOSITORY").exists())
{
- _imp->binary_origin.reset(new LiteralMetadataStringKey("BINARY_REPOSITORY", "Binary repository",
+ _imp->binary_origin.reset(new LiteralMetadataValueKey<std::string> ("BINARY_REPOSITORY", "Binary repository",
mkt_normal, file_contents(_imp->dir / "BINARY_REPOSITORY")));
add_metadata_key(_imp->binary_origin);
}
if ((_imp->dir / "ASFLAGS").exists())
{
- _imp->asflags.reset(new LiteralMetadataStringKey("ASFLAGS", "ASFLAGS",
+ _imp->asflags.reset(new LiteralMetadataValueKey<std::string> ("ASFLAGS", "ASFLAGS",
mkt_internal, file_contents(_imp->dir / "ASFLAGS")));
add_metadata_key(_imp->asflags);
}
if ((_imp->dir / "CBUILD").exists())
{
- _imp->cbuild.reset(new LiteralMetadataStringKey("CBUILD", "CBUILD",
+ _imp->cbuild.reset(new LiteralMetadataValueKey<std::string> ("CBUILD", "CBUILD",
mkt_internal, file_contents(_imp->dir / "CBUILD")));
add_metadata_key(_imp->cbuild);
}
if ((_imp->dir / "CFLAGS").exists())
{
- _imp->cflags.reset(new LiteralMetadataStringKey("CFLAGS", "CFLAGS",
+ _imp->cflags.reset(new LiteralMetadataValueKey<std::string> ("CFLAGS", "CFLAGS",
mkt_internal, file_contents(_imp->dir / "CFLAGS")));
add_metadata_key(_imp->cflags);
}
if ((_imp->dir / "CHOST").exists())
{
- _imp->chost.reset(new LiteralMetadataStringKey("CHOST", "CHOST",
+ _imp->chost.reset(new LiteralMetadataValueKey<std::string> ("CHOST", "CHOST",
mkt_internal, file_contents(_imp->dir / "CHOST")));
add_metadata_key(_imp->chost);
}
if ((_imp->dir / "CXXFLAGS").exists())
{
- _imp->cxxflags.reset(new LiteralMetadataStringKey("CXXFLAGS", "CXXFLAGS",
+ _imp->cxxflags.reset(new LiteralMetadataValueKey<std::string> ("CXXFLAGS", "CXXFLAGS",
mkt_internal, file_contents(_imp->dir / "CXXFLAGS")));
add_metadata_key(_imp->cxxflags);
}
if ((_imp->dir / "LDFLAGS").exists())
{
- _imp->ldflags.reset(new LiteralMetadataStringKey("LDFLAGS", "LDFLAGS",
+ _imp->ldflags.reset(new LiteralMetadataValueKey<std::string> ("LDFLAGS", "LDFLAGS",
mkt_internal, file_contents(_imp->dir / "LDFLAGS")));
add_metadata_key(_imp->ldflags);
}
if ((_imp->dir / "PKGMANAGER").exists())
{
- _imp->pkgmanager.reset(new LiteralMetadataStringKey("PKGMANAGER", "Installed using",
+ _imp->pkgmanager.reset(new LiteralMetadataValueKey<std::string> ("PKGMANAGER", "Installed using",
mkt_normal, file_contents(_imp->dir / "PKGMANAGER")));
add_metadata_key(_imp->pkgmanager);
}
if ((_imp->dir / "VDB_FORMAT").exists())
{
- _imp->vdb_format.reset(new LiteralMetadataStringKey("VDB_FORMAT", "VDB Format",
+ _imp->vdb_format.reset(new LiteralMetadataValueKey<std::string> ("VDB_FORMAT", "VDB Format",
mkt_internal, file_contents(_imp->dir / "VDB_FORMAT")));
add_metadata_key(_imp->vdb_format);
}
@@ -481,10 +481,10 @@ EInstalledRepositoryID::eapi() const
return _imp->eapi;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
EInstalledRepositoryID::virtual_for_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
@@ -582,20 +582,20 @@ EInstalledRepositoryID::homepage_key() const
return _imp->homepage;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EInstalledRepositoryID::short_description_key() const
{
need_keys_added();
return _imp->short_description;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EInstalledRepositoryID::long_description_key() const
{
- 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> > >
EInstalledRepositoryID::contents_key() const
{
need_keys_added();
@@ -609,21 +609,21 @@ EInstalledRepositoryID::installed_time_key() const
return _imp->installed_time;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EInstalledRepositoryID::source_origin_key() const
{
need_keys_added();
return _imp->source_origin;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EInstalledRepositoryID::binary_origin_key() const
{
need_keys_added();
return _imp->binary_origin;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
EInstalledRepositoryID::fs_location_key() const
{
// Avoid loading whole metadata
@@ -631,7 +631,7 @@ EInstalledRepositoryID::fs_location_key() const
{
Lock l(_imp->mutex);
- _imp->fs_location.reset(new LiteralMetadataFSEntryKey(fs_location_raw_name(),
+ _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> (fs_location_raw_name(),
fs_location_human_name(), mkt_internal, _imp->dir));
add_metadata_key(_imp->fs_location);
}
@@ -639,16 +639,16 @@ EInstalledRepositoryID::fs_location_key() const
return _imp->fs_location;
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
EInstalledRepositoryID::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> >
EInstalledRepositoryID::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
@@ -784,10 +784,10 @@ EInstalledRepositoryID::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> > >
EInstalledRepositoryID::contained_in_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
diff --git a/paludis/repositories/e/e_installed_repository_id.hh b/paludis/repositories/e/e_installed_repository_id.hh
index 64b9b4c45..e905fffd0 100644
--- a/paludis/repositories/e/e_installed_repository_id.hh
+++ b/paludis/repositories/e/e_installed_repository_id.hh
@@ -58,7 +58,7 @@ namespace paludis
virtual const tr1::shared_ptr<const Repository> repository() const;
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 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<KeywordNameSet> > eclass_keywords_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
@@ -70,17 +70,17 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<RestrictSpecTree> > restrict_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;
virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> > use_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > inherited_key() const;
@@ -98,7 +98,7 @@ namespace paludis
virtual std::string fs_location_raw_name() const = 0;
virtual std::string fs_location_human_name() const = 0;
virtual std::string contents_filename() const = 0;
- virtual tr1::shared_ptr<MetadataContentsKey> make_contents_key() const = 0;
+ virtual tr1::shared_ptr<MetadataValueKey<tr1::shared_ptr<const Contents> > > make_contents_key() const = 0;
};
}
}
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 3deac0066..b8d74c586 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -53,7 +53,7 @@ using namespace paludis::erepository;
EMutableRepositoryMaskInfoKey::EMutableRepositoryMaskInfoKey(const tr1::shared_ptr<const ERepositoryID> &,
const std::string & r, const std::string & h, tr1::shared_ptr<const RepositoryMaskInfo> v, const MetadataKeyType t) :
- MetadataRepositoryMaskInfoKey(r, h, t),
+ MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > (r, h, t),
_value(v)
{
}
@@ -972,7 +972,7 @@ namespace paludis
EContentsKey::EContentsKey(const tr1::shared_ptr<const ERepositoryID> & id,
const std::string & r, const std::string & h, const FSEntry & v, const MetadataKeyType t) :
- MetadataContentsKey(r, h, t),
+ MetadataValueKey<tr1::shared_ptr<const Contents> > (r, h, t),
PrivateImplementationPattern<EContentsKey>(new Implementation<EContentsKey>(id, v)),
_imp(PrivateImplementationPattern<EContentsKey>::_imp)
{
@@ -1113,7 +1113,7 @@ namespace paludis
EDistSizeKey::EDistSizeKey(const std::string & r, const std::string & h, const MetadataKeyType t,
const tr1::shared_ptr<const EFetchableURIKey> & s,
const tr1::shared_ptr<DistfilesSizeVisitor> & d) :
- MetadataSizeKey(r, h, t),
+ MetadataValueKey<long> (r, h, t),
PrivateImplementationPattern<EDistSizeKey>(new Implementation<EDistSizeKey>(s, d)),
_imp(PrivateImplementationPattern<EDistSizeKey>::_imp)
{
@@ -1123,7 +1123,7 @@ EDistSizeKey::~EDistSizeKey()
{
}
-long
+const long
EDistSizeKey::value() const
{
Lock l(_imp->value_mutex);
diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh
index 755c3ce9b..d72cf7493 100644
--- a/paludis/repositories/e/e_key.hh
+++ b/paludis/repositories/e/e_key.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
@@ -33,7 +33,7 @@ namespace paludis
class ERepositoryID;
class EMutableRepositoryMaskInfoKey :
- public MetadataRepositoryMaskInfoKey
+ public MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> >
{
private:
tr1::shared_ptr<const RepositoryMaskInfo> _value;
@@ -287,7 +287,7 @@ namespace paludis
};
class EContentsKey :
- public MetadataContentsKey,
+ public MetadataValueKey<tr1::shared_ptr<const Contents> >,
private PrivateImplementationPattern<EContentsKey>
{
private:
@@ -320,7 +320,7 @@ namespace paludis
};
class EDistSizeKey:
- public MetadataSizeKey,
+ public MetadataValueKey<long>,
private PrivateImplementationPattern<EDistSizeKey>
{
private:
@@ -333,7 +333,7 @@ namespace paludis
~EDistSizeKey();
- long value() const
+ const long value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
std::string pretty_print() const
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index e31126884..e444f386b 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -150,7 +150,7 @@ namespace
query::InstalledAtRoot(_env->root()),
qo_order_by_version));
if (q->empty())
- key.reset(new LiteralMetadataStringKey(*i, *i, mkt_normal, "(none)"));
+ key.reset(new LiteralMetadataValueKey<std::string>(*i, *i, mkt_normal, "(none)"));
else
{
using namespace tr1::placeholders;
@@ -238,32 +238,32 @@ namespace paludis
void need_profiles() const;
void need_profiles_desc() const;
- tr1::shared_ptr<const MetadataStringKey> format_key;
- tr1::shared_ptr<const MetadataStringKey> layout_key;
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > layout_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
tr1::shared_ptr<const MetadataCollectionKey<FSEntrySequence> > profiles_key;
- tr1::shared_ptr<const MetadataFSEntryKey> cache_key;
- tr1::shared_ptr<const MetadataFSEntryKey> write_cache_key;
- tr1::shared_ptr<const MetadataStringKey> append_repository_name_to_write_cache_key;
- tr1::shared_ptr<const MetadataStringKey> ignore_deprecated_profiles;
- tr1::shared_ptr<const MetadataFSEntryKey> names_cache_key;
- tr1::shared_ptr<const MetadataFSEntryKey> distdir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > cache_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > write_cache_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > append_repository_name_to_write_cache_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > ignore_deprecated_profiles;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > names_cache_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > distdir_key;
tr1::shared_ptr<const MetadataCollectionKey<FSEntrySequence> > eclassdirs_key;
- tr1::shared_ptr<const MetadataFSEntryKey> securitydir_key;
- tr1::shared_ptr<const MetadataFSEntryKey> setsdir_key;
- tr1::shared_ptr<const MetadataFSEntryKey> newsdir_key;
- tr1::shared_ptr<const MetadataStringKey> sync_key;
- tr1::shared_ptr<const MetadataStringKey> sync_options_key;
- tr1::shared_ptr<const MetadataFSEntryKey> builddir_key;
- tr1::shared_ptr<const MetadataStringKey> master_repository_key;
- tr1::shared_ptr<const MetadataStringKey> eapi_when_unknown_key;
- tr1::shared_ptr<const MetadataStringKey> eapi_when_unspecified_key;
- tr1::shared_ptr<const MetadataStringKey> profile_eapi_key;
- tr1::shared_ptr<const MetadataStringKey> use_manifest_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > securitydir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > setsdir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > newsdir_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > sync_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > sync_options_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > master_repository_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > eapi_when_unknown_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > eapi_when_unspecified_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > profile_eapi_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > use_manifest_key;
tr1::shared_ptr<const MetadataSectionKey> info_pkgs_key;
- tr1::shared_ptr<const MetadataStringKey> binary_destination_key;
- tr1::shared_ptr<const MetadataStringKey> binary_src_uri_prefix_key;
- tr1::shared_ptr<const MetadataStringKey> binary_keywords;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > binary_destination_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > binary_src_uri_prefix_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > binary_keywords;
};
Implementation<ERepository>::Implementation(ERepository * const r,
@@ -282,63 +282,63 @@ namespace paludis
params.layout)(r, params.location, entries_ptr, params.master_repository ?
make_shared_ptr(new FSEntry(params.master_repository->params().location)) :
tr1::shared_ptr<FSEntry>())),
- format_key(new LiteralMetadataStringKey("format", "format",
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, params.entry_format)),
- layout_key(new LiteralMetadataStringKey("layout", "layout",
+ layout_key(new LiteralMetadataValueKey<std::string> ("layout", "layout",
mkt_normal, params.layout)),
- location_key(new LiteralMetadataFSEntryKey("location", "location",
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
mkt_significant, params.location)),
profiles_key(new LiteralMetadataFSEntrySequenceKey(
"profiles", "profiles", mkt_normal, params.profiles)),
- cache_key(new LiteralMetadataFSEntryKey("cache", "cache",
+ cache_key(new LiteralMetadataValueKey<FSEntry> ("cache", "cache",
mkt_normal, params.cache)),
- write_cache_key(new LiteralMetadataFSEntryKey("write_cache", "write_cache",
+ write_cache_key(new LiteralMetadataValueKey<FSEntry> ("write_cache", "write_cache",
mkt_normal, params.write_cache)),
- append_repository_name_to_write_cache_key(new LiteralMetadataStringKey(
+ append_repository_name_to_write_cache_key(new LiteralMetadataValueKey<std::string> (
"append_repository_name_to_write_cache", "append_repository_name_to_write_cache",
mkt_normal, stringify(params.append_repository_name_to_write_cache))),
- ignore_deprecated_profiles(new LiteralMetadataStringKey(
+ ignore_deprecated_profiles(new LiteralMetadataValueKey<std::string> (
"ignore_deprecated_profiles", "ignore_deprecated_profiles",
mkt_normal, stringify(params.ignore_deprecated_profiles))),
- names_cache_key(new LiteralMetadataFSEntryKey(
+ names_cache_key(new LiteralMetadataValueKey<FSEntry> (
"names_cache", "names_cache", mkt_normal, params.names_cache)),
- distdir_key(new LiteralMetadataFSEntryKey(
+ distdir_key(new LiteralMetadataValueKey<FSEntry> (
"distdir", "distdir", mkt_normal, params.distdir)),
eclassdirs_key(new LiteralMetadataFSEntrySequenceKey(
"eclassdirs", "eclassdirs", mkt_normal, params.eclassdirs)),
- securitydir_key(new LiteralMetadataFSEntryKey(
+ securitydir_key(new LiteralMetadataValueKey<FSEntry> (
"securitydir", "securitydir", mkt_normal, params.securitydir)),
- setsdir_key(new LiteralMetadataFSEntryKey(
+ setsdir_key(new LiteralMetadataValueKey<FSEntry> (
"setsdir", "setsdir", mkt_normal, params.setsdir)),
- newsdir_key(new LiteralMetadataFSEntryKey(
+ newsdir_key(new LiteralMetadataValueKey<FSEntry> (
"newsdir", "newsdir", mkt_normal, params.newsdir)),
- sync_key(new LiteralMetadataStringKey(
+ sync_key(new LiteralMetadataValueKey<std::string> (
"sync", "sync", mkt_normal, params.sync)),
- sync_options_key(new LiteralMetadataStringKey(
+ sync_options_key(new LiteralMetadataValueKey<std::string> (
"sync_options", "sync_options", mkt_normal, params.sync_options)),
- builddir_key(new LiteralMetadataFSEntryKey(
+ builddir_key(new LiteralMetadataValueKey<FSEntry> (
"builddir", "builddir", mkt_normal, params.builddir)),
master_repository_key(params.master_repository ?
- tr1::shared_ptr<MetadataStringKey>(new LiteralMetadataStringKey(
+ tr1::shared_ptr<MetadataValueKey<std::string> >(new LiteralMetadataValueKey<std::string> (
"master_repository", "master_repository", mkt_normal, stringify(params.master_repository->name()))) :
- tr1::shared_ptr<MetadataStringKey>()),
- eapi_when_unknown_key(new LiteralMetadataStringKey(
+ tr1::shared_ptr<MetadataValueKey<std::string> >()),
+ eapi_when_unknown_key(new LiteralMetadataValueKey<std::string> (
"eapi_when_unknown", "eapi_when_unknown", mkt_normal, params.eapi_when_unknown)),
- eapi_when_unspecified_key(new LiteralMetadataStringKey(
+ eapi_when_unspecified_key(new LiteralMetadataValueKey<std::string> (
"eapi_when_unspecified", "eapi_when_unspecified", mkt_normal, params.eapi_when_unspecified)),
- profile_eapi_key(new LiteralMetadataStringKey(
+ profile_eapi_key(new LiteralMetadataValueKey<std::string> (
"profile_eapi", "profile_eapi", mkt_normal, params.profile_eapi)),
- use_manifest_key(new LiteralMetadataStringKey(
+ use_manifest_key(new LiteralMetadataValueKey<std::string> (
"use_manifest", "use_manifest", mkt_normal, stringify(params.use_manifest))),
info_pkgs_key((layout->info_packages_file(params.location / "profiles")).exists() ?
tr1::shared_ptr<MetadataSectionKey>(new PkgInfoSectionKey(
params.environment, layout->info_packages_file(params.location / "profiles"), params.profile_eapi)) :
tr1::shared_ptr<MetadataSectionKey>()),
- binary_destination_key(new LiteralMetadataStringKey(
+ binary_destination_key(new LiteralMetadataValueKey<std::string> (
"binary_destination", "binary_destination", mkt_normal, stringify(params.binary_destination))),
- binary_src_uri_prefix_key(new LiteralMetadataStringKey(
+ binary_src_uri_prefix_key(new LiteralMetadataValueKey<std::string> (
"binary_uri_prefix", "binary_uri_prefix", mkt_normal, params.binary_uri_prefix)),
- binary_keywords(new LiteralMetadataStringKey(
+ binary_keywords(new LiteralMetadataValueKey<std::string> (
"binary_keywords", "binary_keywords", mkt_normal, params.binary_keywords))
{
}
@@ -1399,15 +1399,15 @@ ERepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
ERepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
ERepository::installed_root_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 3a1be967a..1e1e36c97 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_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
@@ -243,8 +243,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;
};
}
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index ee0fc48e1..2c2a8655d 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1137,7 +1137,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-0",
UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
TEST_CHECK(id);
- TEST_CHECK_EQUAL(visitor_cast<const MetadataStringKey>(**id->find_metadata("EAPI"))->value(), "0");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
}
@@ -1212,7 +1212,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-1",
UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
TEST_CHECK(id);
- TEST_CHECK_EQUAL(visitor_cast<const MetadataStringKey>(**id->find_metadata("EAPI"))->value(), "1");
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
}
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index ed2f64175..9b14a25af 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -72,8 +72,8 @@ namespace paludis
mutable bool has_keys;
mutable bool has_masks;
- mutable tr1::shared_ptr<const LiteralMetadataFSEntryKey> fs_location;
- mutable tr1::shared_ptr<const LiteralMetadataStringKey> short_description;
+ mutable tr1::shared_ptr<const LiteralMetadataValueKey<FSEntry> > fs_location;
+ mutable tr1::shared_ptr<const LiteralMetadataValueKey<std::string> > short_description;
mutable tr1::shared_ptr<const EDependenciesKey> build_dependencies;
mutable tr1::shared_ptr<const EDependenciesKey> run_dependencies;
mutable tr1::shared_ptr<const EDependenciesKey> post_dependencies;
@@ -150,7 +150,7 @@ EbuildID::need_keys_added() const
// fs_location key could have been loaded by the ::fs_location_key() already.
if (! _imp->fs_location)
{
- _imp->fs_location.reset(new LiteralMetadataFSEntryKey("EBUILD", "Ebuild Location",
+ _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> ("EBUILD", "Ebuild Location",
mkt_internal, _imp->ebuild));
add_metadata_key(_imp->fs_location);
}
@@ -256,7 +256,7 @@ EbuildID::need_keys_added() const
}
}
- add_metadata_key(make_shared_ptr(new LiteralMetadataStringKey("EAPI", "EAPI", mkt_internal, _imp->eapi->name)));
+ add_metadata_key(make_shared_ptr(new LiteralMetadataValueKey<std::string> ("EAPI", "EAPI", mkt_internal, _imp->eapi->name)));
_imp->repository_mask = make_shared_ptr(new EMutableRepositoryMaskInfoKey(shared_from_this(), "repository_mask", "Repository masked",
tr1::static_pointer_cast<const ERepository>(repository())->repository_masked(*this), mkt_internal));
@@ -494,10 +494,10 @@ EbuildID::eapi() const
return _imp->eapi;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
EbuildID::virtual_for_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
@@ -590,23 +590,23 @@ EbuildID::homepage_key() const
return _imp->homepage;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EbuildID::short_description_key() const
{
need_keys_added();
return _imp->short_description;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EbuildID::long_description_key() const
{
- 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> > >
EbuildID::contents_key() const
{
- return tr1::shared_ptr<const MetadataContentsKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >();
}
const tr1::shared_ptr<const MetadataTimeKey>
@@ -615,16 +615,16 @@ EbuildID::installed_time_key() const
return tr1::shared_ptr<const MetadataTimeKey>();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
EbuildID::source_origin_key() const
{
- 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> >
EbuildID::binary_origin_key() const
{
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
const tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
@@ -633,7 +633,7 @@ EbuildID::inherited_key() const
return _imp->inherited;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
EbuildID::fs_location_key() const
{
// Avoid loading whole metadata
@@ -641,21 +641,21 @@ EbuildID::fs_location_key() const
{
Lock l(_imp->mutex);
- _imp->fs_location.reset(new LiteralMetadataFSEntryKey("EBUILD", "Ebuild Location", mkt_internal, _imp->ebuild));
+ _imp->fs_location.reset(new LiteralMetadataValueKey<FSEntry> ("EBUILD", "Ebuild Location", mkt_internal, _imp->ebuild));
add_metadata_key(_imp->fs_location);
}
return _imp->fs_location;
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
EbuildID::size_of_download_required_key() const
{
need_keys_added();
return _imp->size_of_download_required;
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
EbuildID::size_of_all_distfiles_key() const
{
need_keys_added();
@@ -698,7 +698,7 @@ void
EbuildID::load_short_description(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->short_description.reset(new LiteralMetadataStringKey(r, h, mkt_significant, v));
+ _imp->short_description.reset(new LiteralMetadataValueKey<std::string> (r, h, mkt_significant, v));
add_metadata_key(_imp->short_description);
}
@@ -943,9 +943,9 @@ EbuildID::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> > >
EbuildID::contained_in_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh
index c4ab9addf..4c5d410cc 100644
--- a/paludis/repositories/e/ebuild_id.hh
+++ b/paludis/repositories/e/ebuild_id.hh
@@ -63,7 +63,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<KeywordNameSet> > eclass_keywords_key() const;
virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
@@ -74,17 +74,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 MetadataCollectionKey<Set<std::string> > > inherited_key() const;
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
diff --git a/paludis/repositories/e/exndbam_id.cc b/paludis/repositories/e/exndbam_id.cc
index 73bec8327..b0365759b 100644
--- a/paludis/repositories/e/exndbam_id.cc
+++ b/paludis/repositories/e/exndbam_id.cc
@@ -46,7 +46,7 @@ namespace
}
class ExndbamContentsKey :
- public MetadataContentsKey
+ public MetadataValueKey<tr1::shared_ptr<const Contents> >
{
private:
const PackageID * const _id;
@@ -56,7 +56,7 @@ namespace
public:
ExndbamContentsKey(const PackageID * const i, const NDBAM * const d) :
- MetadataContentsKey("contents", "Contents", mkt_internal),
+ MetadataValueKey<tr1::shared_ptr<const Contents> > ("contents", "Contents", mkt_internal),
_id(i),
_db(d)
{
@@ -107,7 +107,7 @@ ExndbamID::contents_filename() const
return "contents";
}
-tr1::shared_ptr<MetadataContentsKey>
+tr1::shared_ptr<MetadataValueKey<tr1::shared_ptr<const Contents> > >
ExndbamID::make_contents_key() const
{
return make_shared_ptr(new ExndbamContentsKey(this, _ndbam));
diff --git a/paludis/repositories/e/exndbam_id.hh b/paludis/repositories/e/exndbam_id.hh
index 7586b56a1..b0521c5c1 100644
--- a/paludis/repositories/e/exndbam_id.hh
+++ b/paludis/repositories/e/exndbam_id.hh
@@ -43,7 +43,7 @@ namespace paludis
virtual std::string fs_location_raw_name() const;
virtual std::string fs_location_human_name() const;
virtual std::string contents_filename() const;
- virtual tr1::shared_ptr<MetadataContentsKey> make_contents_key() const;
+ virtual tr1::shared_ptr<MetadataValueKey<tr1::shared_ptr<const Contents> > > make_contents_key() const;
};
}
}
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 075a118b6..f62eb5295 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -66,24 +66,24 @@ namespace paludis
ExndbamRepositoryParams params;
mutable NDBAM ndbam;
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataFSEntryKey> root_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
- tr1::shared_ptr<const MetadataFSEntryKey> world_key;
- tr1::shared_ptr<const MetadataFSEntryKey> builddir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > world_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
Implementation(const ExndbamRepositoryParams & p) :
params(p),
ndbam(params.location, &supported_exndbam, "exndbam-1"),
- location_key(new LiteralMetadataFSEntryKey("location", "location",
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
mkt_significant, params.location)),
- root_key(new LiteralMetadataFSEntryKey("root", "root",
+ root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
mkt_normal, params.root)),
- format_key(new LiteralMetadataStringKey("format", "format",
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, "vdb")),
- world_key(new LiteralMetadataFSEntryKey("world", "world",
+ world_key(new LiteralMetadataValueKey<FSEntry> ("world", "world",
mkt_normal, params.world)),
- builddir_key(new LiteralMetadataFSEntryKey("builddir", "builddir",
+ builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
mkt_normal, params.builddir))
{
}
@@ -246,13 +246,13 @@ ExndbamRepositoryConfigurationError::ExndbamRepositoryConfigurationError(
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
ExndbamRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
ExndbamRepository::installed_root_key() const
{
return _imp->root_key;
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index 208cd46f7..1330b40be 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -101,8 +101,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;
///\name For use by ExndbamID
///\{
diff --git a/paludis/repositories/e/pipe_command_handler.cc b/paludis/repositories/e/pipe_command_handler.cc
index e8900077d..b4d3744c9 100644
--- a/paludis/repositories/e/pipe_command_handler.cc
+++ b/paludis/repositories/e/pipe_command_handler.cc
@@ -210,9 +210,9 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
Repository::MetadataConstIterator key(repo->find_metadata("location"));
if (repo->end_metadata() == key)
return "Einstalled repository has no location key";
- if (! visitor_cast<const MetadataFSEntryKey>(**key))
- return "Einstalled repository location key is not a MetadataFSEntryKey";
- return "O0;" + stringify(visitor_cast<const MetadataFSEntryKey>(**key)->value());
+ if (! visitor_cast<const MetadataValueKey<FSEntry> >(**key))
+ return "Einstalled repository location key is not a MetadataValueKey<FSEntry> ";
+ return "O0;" + stringify(visitor_cast<const MetadataValueKey<FSEntry> >(**key)->value());
}
}
else if (tokens[0] == "EVER")
diff --git a/paludis/repositories/e/qa/metadata_keys.cc b/paludis/repositories/e/qa/metadata_keys.cc
index a1cc1024b..8b585fcbc 100644
--- a/paludis/repositories/e/qa/metadata_keys.cc
+++ b/paludis/repositories/e/qa/metadata_keys.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 2008 Ciaran McCreesh
* Copyright (c) 2008 David Leverton
*
* This file is part of the Paludis package manager. Paludis is free software;
@@ -36,17 +36,17 @@ namespace
struct KeyValidator :
ConstVisitor<MetadataKeyVisitorTypes>
{
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
const std::string & PALUDIS_ATTRIBUTE((unused)) s(k.value());
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
long PALUDIS_ATTRIBUTE((unused)) t(k.value());
}
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
const tr1::shared_ptr<const PackageID> & PALUDIS_ATTRIBUTE((unused)) p(k.value());
}
@@ -56,17 +56,17 @@ namespace
time_t PALUDIS_ATTRIBUTE((unused)) t(k.value());
}
- void visit(const MetadataContentsKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > & k)
{
const tr1::shared_ptr<const Contents> & PALUDIS_ATTRIBUTE((unused)) c(k.value());
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry>& k)
{
const FSEntry & PALUDIS_ATTRIBUTE((unused)) c(k.value());
}
- void visit(const MetadataRepositoryMaskInfoKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > & k)
{
const tr1::shared_ptr<const RepositoryMaskInfo> & PALUDIS_ATTRIBUTE((unused)) i(k.value());
}
diff --git a/paludis/repositories/e/qa/spec_keys.cc b/paludis/repositories/e/qa/spec_keys.cc
index d3e8dd72f..ed931d8f5 100644
--- a/paludis/repositories/e/qa/spec_keys.cc
+++ b/paludis/repositories/e/qa/spec_keys.cc
@@ -319,11 +319,11 @@ namespace
k->accept(*this);
}
- void visit(const MetadataStringKey &)
+ void visit(const MetadataValueKey<std::string> &)
{
}
- void visit(const MetadataSizeKey &)
+ void visit(const MetadataValueKey<long> &)
{
}
@@ -331,15 +331,15 @@ namespace
{
}
- void visit(const MetadataContentsKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > &)
{
}
- void visit(const MetadataPackageIDKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > &)
{
}
- void visit(const MetadataRepositoryMaskInfoKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > &)
{
}
@@ -367,7 +367,7 @@ namespace
{
}
- void visit(const MetadataFSEntryKey &)
+ void visit(const MetadataValueKey<FSEntry> &)
{
}
diff --git a/paludis/repositories/e/vdb_id.cc b/paludis/repositories/e/vdb_id.cc
index 0e09c2863..fcd8bbee0 100644
--- a/paludis/repositories/e/vdb_id.cc
+++ b/paludis/repositories/e/vdb_id.cc
@@ -50,7 +50,7 @@ VDBID::contents_filename() const
return "CONTENTS";
}
-tr1::shared_ptr<MetadataContentsKey>
+tr1::shared_ptr<MetadataValueKey<tr1::shared_ptr<const Contents> > >
VDBID::make_contents_key() const
{
return make_shared_ptr(new EContentsKey(shared_from_this(), "CONTENTS", "Contents",
diff --git a/paludis/repositories/e/vdb_id.hh b/paludis/repositories/e/vdb_id.hh
index 015b9bc8d..e7dd55e5b 100644
--- a/paludis/repositories/e/vdb_id.hh
+++ b/paludis/repositories/e/vdb_id.hh
@@ -38,7 +38,7 @@ namespace paludis
virtual std::string fs_location_raw_name() const;
virtual std::string fs_location_human_name() const;
virtual std::string contents_filename() const;
- virtual tr1::shared_ptr<MetadataContentsKey> make_contents_key() const;
+ virtual tr1::shared_ptr<MetadataValueKey<tr1::shared_ptr<const Contents> > > make_contents_key() const;
};
}
}
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 032054411..83996c2d9 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -101,13 +101,13 @@ namespace paludis
Implementation(const VDBRepository * const, const VDBRepositoryParams &, tr1::shared_ptr<Mutex> = make_shared_ptr(new Mutex));
~Implementation();
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataFSEntryKey> root_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
- tr1::shared_ptr<const MetadataFSEntryKey> world_key;
- tr1::shared_ptr<const MetadataFSEntryKey> provides_cache_key;
- tr1::shared_ptr<const MetadataFSEntryKey> names_cache_key;
- tr1::shared_ptr<const MetadataFSEntryKey> builddir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > world_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > provides_cache_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > names_cache_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
};
Implementation<VDBRepository>::Implementation(const VDBRepository * const r,
@@ -116,19 +116,19 @@ namespace paludis
big_nasty_mutex(m),
has_category_names(false),
names_cache(new RepositoryNameCache(p.names_cache, r)),
- location_key(new LiteralMetadataFSEntryKey("location", "location",
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
mkt_significant, params.location)),
- root_key(new LiteralMetadataFSEntryKey("root", "root",
+ root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
mkt_normal, params.root)),
- format_key(new LiteralMetadataStringKey("format", "format",
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, "vdb")),
- world_key(new LiteralMetadataFSEntryKey("world", "world",
+ world_key(new LiteralMetadataValueKey<FSEntry> ("world", "world",
mkt_normal, params.world)),
- provides_cache_key(new LiteralMetadataFSEntryKey("provides_cache", "provides_cache",
+ provides_cache_key(new LiteralMetadataValueKey<FSEntry> ("provides_cache", "provides_cache",
mkt_normal, params.provides_cache)),
- names_cache_key(new LiteralMetadataFSEntryKey("names_cache", "names_cache",
+ names_cache_key(new LiteralMetadataValueKey<FSEntry> ("names_cache", "names_cache",
mkt_normal, params.names_cache)),
- builddir_key(new LiteralMetadataFSEntryKey("builddir", "builddir",
+ builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
mkt_normal, params.builddir))
{
}
@@ -882,13 +882,13 @@ VDBRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
VDBRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
VDBRepository::installed_root_key() const
{
return _imp->root_key;
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index d7aaae026..795f67e2a 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -138,8 +138,8 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
/* 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_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;
};
}
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index 5ae4a921a..e3faa3031 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -48,11 +48,11 @@ namespace paludis
std::string platform;
std::string homepage;
- tr1::shared_ptr<LiteralMetadataStringKey> description_key;
- tr1::shared_ptr<LiteralMetadataStringKey> summary_key;
- tr1::shared_ptr<LiteralMetadataStringKey> authors_key;
- tr1::shared_ptr<LiteralMetadataStringKey> rubyforge_project_key;
- tr1::shared_ptr<LiteralMetadataFSEntryKey> fs_location_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > description_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > summary_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > authors_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<std::string> > rubyforge_project_key;
+ tr1::shared_ptr<LiteralMetadataValueKey<FSEntry> > fs_location_key;
tr1::shared_ptr<const FSEntry> load_from_file;
@@ -205,19 +205,19 @@ namespace
{
std::string summary(required_text_only_key(n, "summary"));
if (! summary.empty())
- _imp->summary_key.reset(new LiteralMetadataStringKey("summary", "Summary", mkt_significant, summary));
+ _imp->summary_key.reset(new LiteralMetadataValueKey<std::string> ("summary", "Summary", mkt_significant, summary));
std::string description(optional_text_only_key(n, "description"));
if (! description.empty())
- _imp->description_key.reset(new LiteralMetadataStringKey("description", "Description", mkt_normal, description));
+ _imp->description_key.reset(new LiteralMetadataValueKey<std::string> ("description", "Description", mkt_normal, description));
std::string authors(optional_text_sequence_key(n, "authors"));
if (! authors.empty())
- _imp->authors_key.reset(new LiteralMetadataStringKey("authors", "Authors", mkt_normal, authors));
+ _imp->authors_key.reset(new LiteralMetadataValueKey<std::string> ("authors", "Authors", mkt_normal, authors));
std::string rubyforge_project(optional_text_sequence_key(n, "rubyforge_project"));
if (! rubyforge_project.empty())
- _imp->rubyforge_project_key.reset(new LiteralMetadataStringKey("rubyforge_project", "Rubyforge Project",
+ _imp->rubyforge_project_key.reset(new LiteralMetadataValueKey<std::string> ("rubyforge_project", "Rubyforge Project",
mkt_normal, rubyforge_project));
_imp->date = required_text_only_key(n, "date");
@@ -272,7 +272,7 @@ GemSpecification::GemSpecification(const Environment * const e, const tr1::share
_imp->name_part = stringify(q);
_imp->version = stringify(v);
_imp->load_from_file.reset(new FSEntry(f));
- _imp->fs_location_key.reset(new LiteralMetadataFSEntryKey("GEM", "Gem Location", mkt_internal, f));
+ _imp->fs_location_key.reset(new LiteralMetadataValueKey<FSEntry> ("GEM", "Gem Location", mkt_internal, f));
add_metadata_key(_imp->fs_location_key);
}
@@ -330,10 +330,10 @@ GemSpecification::repository() const
return _imp->repository;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
GemSpecification::virtual_for_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
@@ -390,28 +390,28 @@ GemSpecification::suggested_dependencies_key() const
return tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
GemSpecification::short_description_key() const
{
return _imp->summary_key;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
GemSpecification::long_description_key() const
{
return _imp->description_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
GemSpecification::fs_location_key() const
{
return _imp->fs_location_key;
}
-const tr1::shared_ptr<const MetadataContentsKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >
GemSpecification::contents_key() const
{
- return tr1::shared_ptr<const MetadataContentsKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >();
}
const tr1::shared_ptr<const MetadataTimeKey>
@@ -420,16 +420,16 @@ GemSpecification::installed_time_key() const
return tr1::shared_ptr<const MetadataTimeKey>();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
GemSpecification::source_origin_key() const
{
- 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> >
GemSpecification::binary_origin_key() const
{
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
const tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> >
@@ -438,22 +438,22 @@ GemSpecification::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> > >
GemSpecification::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 MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
GemSpecification::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> >
GemSpecification::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
bool
diff --git a/paludis/repositories/gems/gem_specification.hh b/paludis/repositories/gems/gem_specification.hh
index ee1abfb26..972c3ff5e 100644
--- a/paludis/repositories/gems/gem_specification.hh
+++ b/paludis/repositories/gems/gem_specification.hh
@@ -90,7 +90,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;
@@ -100,19 +100,19 @@ 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 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 MetadataCollectionKey<PackageIDSequence> > contains_key() const;
- virtual const tr1::shared_ptr<const MetadataPackageIDKey> contained_in_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > > contained_in_key() const;
- virtual const tr1::shared_ptr<const MetadataFSEntryKey> fs_location_key() const;
- virtual const tr1::shared_ptr<const MetadataContentsKey> contents_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_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 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<long> > size_of_download_required_key() const;
+ virtual const tr1::shared_ptr<const MetadataValueKey<long> > size_of_all_distfiles_key() const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repositories/gems/gem_specification_TEST.cc b/paludis/repositories/gems/gem_specification_TEST.cc
index 7340df2f0..a4e8cc800 100644
--- a/paludis/repositories/gems/gem_specification_TEST.cc
+++ b/paludis/repositories/gems/gem_specification_TEST.cc
@@ -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
@@ -70,8 +70,8 @@ namespace test_cases
TEST_CHECK_EQUAL(spec.long_description_key()->value(), "A longer description");
TEST_CHECK(spec.find_metadata("authors") != spec.end_metadata());
- TEST_CHECK(visitor_cast<const MetadataStringKey>(**spec.find_metadata("authors")));
- TEST_CHECK_EQUAL(visitor_cast<const MetadataStringKey>(**spec.find_metadata("authors"))->value(), "Fred, Barney");
+ TEST_CHECK(visitor_cast<const MetadataValueKey<std::string> >(**spec.find_metadata("authors")));
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**spec.find_metadata("authors"))->value(), "Fred, Barney");
#if 0
TEST_CHECK_EQUAL(spec.homepage(), "");
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 9153a7ca6..765139f4d 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -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
@@ -54,29 +54,29 @@ namespace paludis
mutable bool has_category_names;
mutable bool has_ids;
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataFSEntryKey> install_dir_key;
- tr1::shared_ptr<const MetadataFSEntryKey> builddir_key;
- tr1::shared_ptr<const MetadataStringKey> sync_key;
- tr1::shared_ptr<const MetadataStringKey> sync_options_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > install_dir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > sync_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > sync_options_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation(const gems::RepositoryParams p, tr1::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
params(p),
big_nasty_mutex(m),
has_category_names(false),
has_ids(false),
- location_key(new LiteralMetadataFSEntryKey("location", "location",
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
mkt_significant, params.location)),
- install_dir_key(new LiteralMetadataFSEntryKey("install_dir", "install_dir",
+ install_dir_key(new LiteralMetadataValueKey<FSEntry> ("install_dir", "install_dir",
mkt_normal, params.install_dir)),
- builddir_key(new LiteralMetadataFSEntryKey("builddir", "builddir",
+ builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
mkt_normal, params.builddir)),
- sync_key(new LiteralMetadataStringKey("sync", "sync",
+ sync_key(new LiteralMetadataValueKey<std::string> ("sync", "sync",
mkt_normal, params.sync)),
- sync_options_key(new LiteralMetadataStringKey(
+ sync_options_key(new LiteralMetadataValueKey<std::string> (
"sync_options", "sync_options", mkt_normal, params.sync_options)),
- format_key(new LiteralMetadataStringKey("format", "format",
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, "gems"))
{
}
@@ -334,15 +334,15 @@ GemsRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
GemsRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
GemsRepository::installed_root_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
diff --git a/paludis/repositories/gems/gems_repository.hh b/paludis/repositories/gems/gems_repository.hh
index e96113b90..31bdb1175 100644
--- a/paludis/repositories/gems/gems_repository.hh
+++ b/paludis/repositories/gems/gems_repository.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
@@ -86,8 +86,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;
};
}
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index cf0803e17..4beece11b 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -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
@@ -59,10 +59,10 @@ namespace paludis
mutable bool has_category_names;
mutable bool has_ids;
- tr1::shared_ptr<const MetadataFSEntryKey> install_dir_key;
- tr1::shared_ptr<const MetadataFSEntryKey> builddir_key;
- tr1::shared_ptr<const MetadataFSEntryKey> root_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > install_dir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation(const gems::InstalledRepositoryParams p,
tr1::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
@@ -70,13 +70,13 @@ namespace paludis
params(p),
has_category_names(false),
has_ids(false),
- install_dir_key(new LiteralMetadataFSEntryKey("install_dir", "install_dir",
+ install_dir_key(new LiteralMetadataValueKey<FSEntry> ("install_dir", "install_dir",
mkt_normal, params.install_dir)),
- builddir_key(new LiteralMetadataFSEntryKey("builddir", "builddir",
+ builddir_key(new LiteralMetadataValueKey<FSEntry> ("builddir", "builddir",
mkt_normal, params.builddir)),
- root_key(new LiteralMetadataFSEntryKey(
+ root_key(new LiteralMetadataValueKey<FSEntry> (
"root", "root", mkt_normal, params.root)),
- format_key(new LiteralMetadataStringKey("format", "format",
+ format_key(new LiteralMetadataValueKey<std::string> ("format", "format",
mkt_significant, "gems"))
{
}
@@ -353,13 +353,13 @@ InstalledGemsRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledGemsRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
InstalledGemsRepository::installed_root_key() const
{
return _imp->root_key;
diff --git a/paludis/repositories/gems/installed_gems_repository.hh b/paludis/repositories/gems/installed_gems_repository.hh
index f180304aa..a60861806 100644
--- a/paludis/repositories/gems/installed_gems_repository.hh
+++ b/paludis/repositories/gems/installed_gems_repository.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
@@ -101,8 +101,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;
};
}
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 204dc5801..3de053122 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -49,14 +49,14 @@ using namespace paludis::unpackaged_repositories;
namespace
{
class InstalledUnpackagedFSEntryKey :
- public MetadataFSEntryKey
+ public MetadataValueKey<FSEntry>
{
private:
const FSEntry _location;
public:
InstalledUnpackagedFSEntryKey(const FSEntry & l) :
- MetadataFSEntryKey("location", "Location", mkt_internal),
+ MetadataValueKey<FSEntry> ("location", "Location", mkt_internal),
_location(l)
{
}
@@ -83,7 +83,7 @@ namespace
}
class InstalledUnpackagedContentsKey :
- public MetadataContentsKey
+ public MetadataValueKey<tr1::shared_ptr<const Contents> >
{
private:
const PackageID * const _id;
@@ -93,7 +93,7 @@ namespace
public:
InstalledUnpackagedContentsKey(const PackageID * const i, const NDBAM * const d) :
- MetadataContentsKey("contents", "Contents", mkt_internal),
+ MetadataValueKey<tr1::shared_ptr<const Contents> > ("contents", "Contents", mkt_internal),
_id(i),
_db(d)
{
@@ -136,7 +136,7 @@ namespace
};
class InstalledUnpackagedStringKey :
- public MetadataStringKey
+ public MetadataValueKey<std::string>
{
private:
mutable tr1::shared_ptr<const std::string> _v;
@@ -145,7 +145,7 @@ namespace
public:
InstalledUnpackagedStringKey(const std::string & r, const std::string & h, const FSEntry & f, const MetadataKeyType t) :
- MetadataStringKey(r, h, t),
+ MetadataValueKey<std::string> (r, h, t),
_f(f)
{
}
@@ -391,10 +391,10 @@ InstalledUnpackagedID::repository() const
return _imp->env->package_database()->fetch_repository(_imp->repository_name);
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
InstalledUnpackagedID::virtual_for_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
@@ -421,10 +421,10 @@ InstalledUnpackagedID::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> > >
InstalledUnpackagedID::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 MetadataSpecTreeKey<DependencySpecTree> >
@@ -463,19 +463,19 @@ InstalledUnpackagedID::homepage_key() const
return tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledUnpackagedID::short_description_key() const
{
return _imp->description_key;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledUnpackagedID::long_description_key() const
{
- 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> > >
InstalledUnpackagedID::contents_key() const
{
return _imp->contents_key;
@@ -487,34 +487,34 @@ InstalledUnpackagedID::installed_time_key() const
return _imp->installed_time_key;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledUnpackagedID::source_origin_key() const
{
return _imp->source_origin_key;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledUnpackagedID::binary_origin_key() const
{
return _imp->binary_origin_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
InstalledUnpackagedID::fs_location_key() const
{
return _imp->fs_location_key;
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
InstalledUnpackagedID::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> >
InstalledUnpackagedID::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
namespace
diff --git a/paludis/repositories/unpackaged/installed_id.hh b/paludis/repositories/unpackaged/installed_id.hh
index c1d8dc758..0e2ed5bda 100644
--- a/paludis/repositories/unpackaged/installed_id.hh
+++ b/paludis/repositories/unpackaged/installed_id.hh
@@ -57,27 +57,27 @@ 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;
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 MetadataValueKey<tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > run_dependencies_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > post_dependencies_key() const;
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 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<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 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;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 259785d95..16f7e1b78 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -62,18 +62,18 @@ namespace paludis
const InstalledUnpackagedRepositoryParams params;
mutable NDBAM ndbam;
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataFSEntryKey> root_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation(const InstalledUnpackagedRepositoryParams & p) :
params(p),
ndbam(p.location, &supported_installed_unpackaged, "installed_unpackaged-1"),
- location_key(new LiteralMetadataFSEntryKey("location", "location",
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
mkt_significant, params.location)),
- root_key(new LiteralMetadataFSEntryKey("root", "root",
+ root_key(new LiteralMetadataValueKey<FSEntry> ("root", "root",
mkt_normal, params.root)),
- format_key(new LiteralMetadataStringKey(
+ format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "installed_unpackaged"))
{
}
@@ -413,16 +413,15 @@ InstalledUnpackagedRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledUnpackagedRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
InstalledUnpackagedRepository::installed_root_key() const
{
return _imp->root_key;
}
-
diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh
index c3160157f..7cedefeeb 100644
--- a/paludis/repositories/unpackaged/installed_repository.hh
+++ b/paludis/repositories/unpackaged/installed_repository.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
@@ -98,8 +98,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;
};
}
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 41ed6ef6e..a417fb623 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -54,10 +54,10 @@ namespace paludis
tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
- const tr1::shared_ptr<LiteralMetadataFSEntryKey> fs_location_key;
+ const tr1::shared_ptr<LiteralMetadataValueKey<FSEntry> > fs_location_key;
const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key;
const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > run_dependencies_key;
- const tr1::shared_ptr<const MetadataStringKey> description_key;
+ const tr1::shared_ptr<const MetadataValueKey<std::string> > description_key;
Implementation(const Environment * const e,
const QualifiedPackageName & q,
@@ -75,12 +75,12 @@ namespace paludis
repository_name(n),
build_dependencies_labels(new DependencyLabelSequence),
run_dependencies_labels(new DependencyLabelSequence),
- fs_location_key(new LiteralMetadataFSEntryKey("location", "Location", mkt_normal, l)),
+ fs_location_key(new LiteralMetadataValueKey<FSEntry> ("location", "Location", mkt_normal, l)),
build_dependencies_key(new UnpackagedDependencyKey(env, "build_dependencies", "Build dependencies", mkt_dependencies,
build_dependencies_labels, b)),
run_dependencies_key(new UnpackagedDependencyKey(env, "run_dependencies", "Run dependencies", mkt_dependencies,
run_dependencies_labels, r)),
- description_key(new LiteralMetadataStringKey("description", "Description", mkt_significant, d))
+ description_key(new LiteralMetadataValueKey<std::string> ("description", "Description", mkt_significant, d))
{
build_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build_dependencies")));
run_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("run_dependencies")));
@@ -161,10 +161,10 @@ UnpackagedID::repository() const
return _imp->env->package_database()->fetch_repository(_imp->repository_name);
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
UnpackagedID::virtual_for_key() const
{
- return tr1::shared_ptr<const MetadataPackageIDKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >();
}
const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
@@ -191,10 +191,10 @@ UnpackagedID::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> > >
UnpackagedID::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 MetadataSpecTreeKey<DependencySpecTree> >
@@ -233,22 +233,22 @@ UnpackagedID::homepage_key() const
return tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
UnpackagedID::short_description_key() const
{
return _imp->description_key;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
UnpackagedID::long_description_key() const
{
- 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> > >
UnpackagedID::contents_key() const
{
- return tr1::shared_ptr<const MetadataContentsKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >();
}
const tr1::shared_ptr<const MetadataTimeKey>
@@ -257,34 +257,34 @@ UnpackagedID::installed_time_key() const
return tr1::shared_ptr<const MetadataTimeKey>();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
UnpackagedID::source_origin_key() const
{
- 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> >
UnpackagedID::binary_origin_key() const
{
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
UnpackagedID::fs_location_key() const
{
return _imp->fs_location_key;
}
-const tr1::shared_ptr<const MetadataSizeKey>
+const tr1::shared_ptr<const MetadataValueKey<long> >
UnpackagedID::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> >
UnpackagedID::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
bool
diff --git a/paludis/repositories/unpackaged/unpackaged_id.hh b/paludis/repositories/unpackaged/unpackaged_id.hh
index a028d3abb..3c2ab4e12 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.hh
+++ b/paludis/repositories/unpackaged/unpackaged_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
@@ -55,27 +55,27 @@ 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;
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 MetadataValueKey<tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > run_dependencies_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > post_dependencies_key() const;
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 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<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 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;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 5c331191a..d1331e3e7 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -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
@@ -45,13 +45,13 @@ namespace paludis
tr1::shared_ptr<QualifiedPackageNameSet> package_names;
tr1::shared_ptr<CategoryNamePartSet> category_names;
- tr1::shared_ptr<const MetadataFSEntryKey> location_key;
- tr1::shared_ptr<const MetadataStringKey> name_key;
- tr1::shared_ptr<const MetadataStringKey> slot_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
- tr1::shared_ptr<const MetadataStringKey> build_dependencies_key;
- tr1::shared_ptr<const MetadataStringKey> run_dependencies_key;
- tr1::shared_ptr<const MetadataStringKey> description_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > name_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > slot_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > build_dependencies_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > run_dependencies_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > description_key;
Implementation(const RepositoryName & n,
const UnpackagedRepositoryParams & p) :
@@ -61,19 +61,19 @@ namespace paludis
ids(new PackageIDSequence),
package_names(new QualifiedPackageNameSet),
category_names(new CategoryNamePartSet),
- location_key(new LiteralMetadataFSEntryKey("location", "location",
+ location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
mkt_significant, params.location)),
- name_key(new LiteralMetadataStringKey("name", "name",
+ name_key(new LiteralMetadataValueKey<std::string> ("name", "name",
mkt_normal, stringify(params.name))),
- slot_key(new LiteralMetadataStringKey("slot", "slot",
+ slot_key(new LiteralMetadataValueKey<std::string> ("slot", "slot",
mkt_normal, stringify(params.slot))),
- format_key(new LiteralMetadataStringKey(
+ format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "unpackaged")),
- build_dependencies_key(new LiteralMetadataStringKey(
+ build_dependencies_key(new LiteralMetadataValueKey<std::string> (
"build_dependencies", "build_dependencies", mkt_normal, params.build_dependencies)),
- run_dependencies_key(new LiteralMetadataStringKey(
+ run_dependencies_key(new LiteralMetadataValueKey<std::string> (
"run_dependencies", "run_dependencies", mkt_normal, params.run_dependencies)),
- description_key(new LiteralMetadataStringKey(
+ description_key(new LiteralMetadataValueKey<std::string> (
"description", "description", mkt_normal, params.description))
{
ids->push_back(id);
@@ -182,15 +182,15 @@ UnpackagedRepository::need_keys_added() const
{
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
UnpackagedRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
UnpackagedRepository::installed_root_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index e1ebd6eb8..5761abc36 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.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
@@ -77,8 +77,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;
};
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 1f76d091d..e3625dfb9 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 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
@@ -55,17 +55,17 @@ namespace paludis
mutable IDMap ids;
mutable bool has_ids;
- tr1::shared_ptr<const MetadataFSEntryKey> root_key;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation(const Environment * const e, const FSEntry & r, tr1::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
env(e),
root(r),
ids_mutex(m),
has_ids(false),
- root_key(new LiteralMetadataFSEntryKey(
+ root_key(new LiteralMetadataValueKey<FSEntry> (
"root", "root", mkt_normal, root)),
- format_key(new LiteralMetadataStringKey(
+ format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "installed_virtuals"))
{
}
@@ -325,13 +325,13 @@ InstalledVirtualsRepository::unimportant_category_names() const
return result;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
InstalledVirtualsRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
InstalledVirtualsRepository::installed_root_key() const
{
return _imp->root_key;
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 8ab949b10..a570a0a1a 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 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
@@ -98,8 +98,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;
};
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 27c5a519a..33e5ebc91 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -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
@@ -147,7 +147,7 @@ namespace paludis
const VersionSpec version;
tr1::shared_ptr<DependencyLabelSequence> bdep_labels;
tr1::shared_ptr<DependencyLabelSequence> rdep_labels;
- const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for;
+ const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > > virtual_for;
const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > bdep;
const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > rdep;
mutable bool has_masks;
@@ -165,7 +165,7 @@ namespace paludis
version(p->version()),
bdep_labels(new DependencyLabelSequence),
rdep_labels(new DependencyLabelSequence),
- virtual_for(new LiteralMetadataPackageIDKey("VIRTUAL_FOR", "Virtual for", mkt_normal, p)),
+ virtual_for(new LiteralMetadataValueKey<tr1::shared_ptr<const PackageID> > ("VIRTUAL_FOR", "Virtual for", mkt_normal, p)),
bdep(new virtuals::VirtualsDepKey(e, "DEPEND", "Build dependencies", p, bdep_labels, b)),
rdep(new virtuals::VirtualsDepKey(e, "RDEPEND", "Run dependencies", p, rdep_labels, b)),
has_masks(false)
@@ -242,7 +242,7 @@ VirtualsPackageID::repository() const
return _imp->repository;
}
-const tr1::shared_ptr<const MetadataPackageIDKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const PackageID> > >
VirtualsPackageID::virtual_for_key() const
{
return _imp->virtual_for;
@@ -290,16 +290,16 @@ VirtualsPackageID::suggested_dependencies_key() const
return tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> >();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
VirtualsPackageID::short_description_key() const
{
- 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> >
VirtualsPackageID::long_description_key() const
{
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
const tr1::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> >
@@ -314,10 +314,10 @@ VirtualsPackageID::homepage_key() const
return tr1::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >();
}
-const tr1::shared_ptr<const MetadataContentsKey>
+const tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >
VirtualsPackageID::contents_key() const
{
- return tr1::shared_ptr<const MetadataContentsKey>();
+ return tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > >();
}
const tr1::shared_ptr<const MetadataTimeKey>
@@ -326,16 +326,16 @@ VirtualsPackageID::installed_time_key() const
return tr1::shared_ptr<const MetadataTimeKey>();
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
VirtualsPackageID::source_origin_key() const
{
- 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> >
VirtualsPackageID::binary_origin_key() const
{
- return tr1::shared_ptr<const MetadataStringKey>();
+ return tr1::shared_ptr<const MetadataValueKey<std::string> >();
}
bool
@@ -502,27 +502,27 @@ VirtualsPackageID::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> > >
VirtualsPackageID::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> >
VirtualsPackageID::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> >
VirtualsPackageID::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> >
VirtualsPackageID::size_of_all_distfiles_key() const
{
- return tr1::shared_ptr<const MetadataSizeKey>();
+ return tr1::shared_ptr<const MetadataValueKey<long> >();
}
diff --git a/paludis/repositories/virtuals/package_id.hh b/paludis/repositories/virtuals/package_id.hh
index e82afd327..e0b1781db 100644
--- a/paludis/repositories/virtuals/package_id.hh
+++ b/paludis/repositories/virtuals/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
@@ -83,7 +83,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;
@@ -93,17 +93,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;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 44bbfce5d..ecbba9a77 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 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
@@ -61,14 +61,14 @@ namespace paludis
mutable IDMap ids;
mutable bool has_ids;
- tr1::shared_ptr<const MetadataStringKey> format_key;
+ tr1::shared_ptr<const MetadataValueKey<std::string> > format_key;
Implementation(const Environment * const e, tr1::shared_ptr<Mutex> m = make_shared_ptr(new Mutex)) :
env(e),
big_nasty_mutex(m),
has_names(false),
has_ids(false),
- format_key(new LiteralMetadataStringKey(
+ format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "virtuals"))
{
}
@@ -414,16 +414,16 @@ VirtualsRepository::unimportant_category_names() const
return result;
}
-const tr1::shared_ptr<const MetadataStringKey>
+const tr1::shared_ptr<const MetadataValueKey<std::string> >
VirtualsRepository::format_key() const
{
return _imp->format_key;
}
-const tr1::shared_ptr<const MetadataFSEntryKey>
+const tr1::shared_ptr<const MetadataValueKey<FSEntry> >
VirtualsRepository::installed_root_key() const
{
- return tr1::shared_ptr<const MetadataFSEntryKey>();
+ return tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
void
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index 9c997107c..e466b91d4 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 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
@@ -100,8 +100,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;
};
}