aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
parent169e91b611f2a12b89467e03abb4c76ddbe3fe7e (diff)
downloadpaludis-830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5.tar.gz
paludis-830cd0e27f1acdbfdf66e6dd7a8630a35a6869b5.tar.xz
Merge various metadata key things.
Diffstat (limited to 'src')
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc12
-rw-r--r--src/clients/inquisitio/key_extractor.cc12
-rw-r--r--src/clients/instruo/instruo.cc16
-rw-r--r--src/clients/paludis/applets.cc14
-rw-r--r--src/clients/paludis/info.cc14
-rw-r--r--src/clients/qualudis/qualudis.cc12
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc2
-rw-r--r--src/output/console_query_task.cc12
-rw-r--r--src/output/mask_displayer.cc12
9 files changed, 53 insertions, 53 deletions
diff --git a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc b/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
index 003b5c71a..1139e1a98 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
@@ -165,17 +165,17 @@ namespace gtkpaludis
got_key(k, k.pretty_print_flat(formatter));
}
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
got_key(k, markup_escape(stringify(*k.value())));
}
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
got_key(k, markup_escape(stringify(k.value())));
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
got_key(k, markup_escape(stringify(k.value())));
}
@@ -190,7 +190,7 @@ namespace gtkpaludis
got_key(k, markup_escape(stringify(buf)));
}
- void visit(const MetadataRepositoryMaskInfoKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > & k)
{
if (! k.value())
return;
@@ -199,12 +199,12 @@ namespace gtkpaludis
join((*k.value())[k::comment()]->begin(), (*k.value())[k::comment()]->end(), " ")));
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry> & k)
{
got_key(k, markup_escape(stringify(k.value())));
}
- void visit(const MetadataContentsKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > &)
{
}
diff --git a/src/clients/inquisitio/key_extractor.cc b/src/clients/inquisitio/key_extractor.cc
index 0f59345a2..1fbb7fdcc 100644
--- a/src/clients/inquisitio/key_extractor.cc
+++ b/src/clients/inquisitio/key_extractor.cc
@@ -197,12 +197,12 @@ namespace
{
}
- void visit(const MetadataStringKey & s)
+ void visit(const MetadataValueKey<std::string> & s)
{
result = _m(s.value());
}
- void visit(const MetadataSizeKey & s)
+ void visit(const MetadataValueKey<long> & s)
{
result = _m(stringify(s.value()));
}
@@ -212,20 +212,20 @@ namespace
result = _m(stringify(s.value()));
}
- void visit(const MetadataContentsKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > &)
{
}
- void visit(const MetadataRepositoryMaskInfoKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > &)
{
}
- void visit(const MetadataFSEntryKey & s)
+ void visit(const MetadataValueKey<FSEntry> & s)
{
result = _m(stringify(s.value()));
}
- void visit(const MetadataPackageIDKey & s)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & s)
{
result = _m(stringify(*s.value()));
}
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 4bb924a2e..19c796b02 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -51,17 +51,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());
}
@@ -71,17 +71,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());
}
@@ -254,13 +254,13 @@ main(int argc, char *argv[])
continue;
}
- if (! visitor_cast<const MetadataStringKey>(**eapi_i))
+ if (! visitor_cast<const MetadataValueKey<std::string> >(**eapi_i))
{
results.insert(std::make_pair(*i, "EAPI metadata key is not a string key"));
continue;
}
- if (visitor_cast<const MetadataStringKey>(**eapi_i)->value() == "UNKNOWN")
+ if (visitor_cast<const MetadataValueKey<std::string> >(**eapi_i)->value() == "UNKNOWN")
{
results.insert(std::make_pair(*i, "EAPI is 'UNKNOWN'"));
continue;
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index f439113c6..05b57b675 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.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
@@ -52,22 +52,22 @@ namespace
{
}
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
std::cout << k.value() << std::endl;
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
std::cout << k.value() << std::endl;
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry> & k)
{
std::cout << k.value() << std::endl;
}
- void visit(const MetadataRepositoryMaskInfoKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > &)
{
std::cout << "(unprintable)" << std::endl;
return_code |= 1;
@@ -79,7 +79,7 @@ namespace
return_code |= 1;
}
- void visit(const MetadataContentsKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > &)
{
std::cout << "(unprintable)" << std::endl;
return_code |= 1;
@@ -157,7 +157,7 @@ namespace
std::cout << k.pretty_print_flat(f) << std::endl;
}
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
std::cout << *k.value() << std::endl;
}
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index 7bc2696a0..a210054e8 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.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
@@ -77,32 +77,32 @@ namespace
std::for_each(indirect_iterator(keys.begin()), indirect_iterator(keys.end()), accept_visitor(i));
}
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << k.value() << endl;
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << k.value() << endl;
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry> & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << k.value() << endl;
}
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << *k.value() << endl;
}
- void visit(const MetadataRepositoryMaskInfoKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << endl;
}
- void visit(const MetadataContentsKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << endl;
}
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 81f6731d7..416fefa0d 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -141,17 +141,17 @@ namespace
<< join(indirect_iterator(k.value()->begin()), indirect_iterator(k.value()->end()), " ") << "\n";
}
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
stream << k.raw_name() << ": " << stringify(*k.value()) << "\n";
}
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
stream << k.raw_name() << ": " << k.value() << "\n";
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
stream << k.raw_name() << ": " << k.value() << "\n";
}
@@ -161,12 +161,12 @@ namespace
stream << k.raw_name() << ": " << k.value() << "\n";
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry> & k)
{
stream << k.raw_name() << ": " << k.value() << "\n";
}
- void visit(const MetadataRepositoryMaskInfoKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > & k)
{
if (k.value())
stream << k.raw_name() << ": " << (*k.value())[k::mask_file()] << ": "
@@ -175,7 +175,7 @@ namespace
stream << k.raw_name() << "\n";
}
- void visit(const MetadataContentsKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > & k)
{
stream << k.raw_name() << "\n";
}
diff --git a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
index d412375af..1afe5696f 100644
--- a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
@@ -327,7 +327,7 @@ Implementation<BrokenLinkageFinder>::gather_package(const tr1::shared_ptr<const
Context ctx("When gathering the contents of " + stringify(*pkg) + ":");
- tr1::shared_ptr<const MetadataContentsKey> key(pkg->contents_key());
+ tr1::shared_ptr<const MetadataValueKey<tr1::shared_ptr<const Contents> > > key(pkg->contents_key());
if (! key)
return;
tr1::shared_ptr<const Contents> contents(key->value());
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index 688e16d54..35b3bd9a0 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -486,7 +486,7 @@ namespace
}
}
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
if (k.type() == type)
{
@@ -503,7 +503,7 @@ namespace
}
}
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
if (k.type() == type)
{
@@ -520,7 +520,7 @@ namespace
}
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
if (k.type() == type)
{
@@ -583,7 +583,7 @@ namespace
}
}
- void visit(const MetadataRepositoryMaskInfoKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > & k)
{
if (k.type() == type && k.value())
{
@@ -607,7 +607,7 @@ namespace
}
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry> & k)
{
if (k.type() == type)
{
@@ -624,7 +624,7 @@ namespace
}
}
- void visit(const MetadataContentsKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > &)
{
}
};
diff --git a/src/output/mask_displayer.cc b/src/output/mask_displayer.cc
index 13fa6f436..6d7f67df6 100644
--- a/src/output/mask_displayer.cc
+++ b/src/output/mask_displayer.cc
@@ -60,17 +60,17 @@ namespace
{
std::ostringstream s;
- void visit(const MetadataPackageIDKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const PackageID> > & k)
{
s << *k.value();
}
- void visit(const MetadataStringKey & k)
+ void visit(const MetadataValueKey<std::string> & k)
{
s << k.value();
}
- void visit(const MetadataSizeKey & k)
+ void visit(const MetadataValueKey<long> & k)
{
s << k.value();
}
@@ -105,17 +105,17 @@ namespace
s << stringify(buf);
}
- void visit(const MetadataContentsKey &)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const Contents> > &)
{
}
- void visit(const MetadataRepositoryMaskInfoKey & k)
+ void visit(const MetadataValueKey<tr1::shared_ptr<const RepositoryMaskInfo> > & k)
{
s << (*k.value())[k::mask_file()] << ": " <<
join((*k.value())[k::comment()]->begin(), (*k.value())[k::comment()]->end(), " ");
}
- void visit(const MetadataFSEntryKey & k)
+ void visit(const MetadataValueKey<FSEntry> & k)
{
s << k.value();
}