aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-14 09:22:50 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-14 09:57:40 +0100
commitcabf80cc5dfeb84eef7c4d7784eee0dc87de6d5e (patch)
tree05a370d70ee2c8aee9d6bdf44a0a4f1a94dff5cc /src
parent81d87f2466fcccf199a0a7363062eab649acb87a (diff)
downloadpaludis-cabf80cc5dfeb84eef7c4d7784eee0dc87de6d5e.tar.gz
paludis-cabf80cc5dfeb84eef7c4d7784eee0dc87de6d5e.tar.xz
Maintainers as objects
Diffstat (limited to 'src')
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc6
-rw-r--r--src/clients/cave/cmd_info.cc6
-rw-r--r--src/clients/cave/cmd_match.cc5
-rw-r--r--src/clients/cave/cmd_show.cc13
-rw-r--r--src/clients/cave/format_plain_metadata_key.cc5
5 files changed, 35 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 04fece641..b0cd10ce0 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -951,6 +951,12 @@ namespace
cout << fuc(fs_mask_by(), fv<'i'>(indent), fv<'k'>(k.human_name()), fv<'v'>(stringify(k.pretty_print_value(printer, { }))));
}
+ void visit(const MetadataCollectionKey<Maintainers> & k)
+ {
+ ColourPrettyPrinter printer(env, id, 0);
+ cout << fuc(fs_mask_by(), fv<'i'>(indent), fv<'k'>(k.human_name()), fv<'v'>(stringify(k.pretty_print_value(printer, { }))));
+ }
+
void visit(const MetadataCollectionKey<FSPathSequence> & k)
{
ColourPrettyPrinter printer(env, id, 0);
diff --git a/src/clients/cave/cmd_info.cc b/src/clients/cave/cmd_info.cc
index ad0e698ad..075727f05 100644
--- a/src/clients/cave/cmd_info.cc
+++ b/src/clients/cave/cmd_info.cc
@@ -198,6 +198,12 @@ namespace
cout << fuc(fs_metadata(), fv<'h'>(k.human_name()), fv<'i'>(std::string(indent, ' ')), fv<'s'>(join(v->begin(), v->end(), " ")));
}
+ void visit(const MetadataCollectionKey<Maintainers> & k)
+ {
+ auto v(k.parse_value());
+ cout << fuc(fs_metadata(), fv<'h'>(k.human_name()), fv<'i'>(std::string(indent, ' ')), fv<'s'>(join(v->begin(), v->end(), " ")));
+ }
+
void visit(const MetadataSpecTreeKey<LicenseSpecTree> & k)
{
ColourPrettyPrinter printer(env, make_null_shared_ptr(), indent);
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 88b01ab04..adc9f7ec2 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -366,6 +366,11 @@ namespace
std::back_inserter(texts), &stringify<PackageID>);
}
+ void visit(const MetadataCollectionKey<Maintainers> & k)
+ {
+ auto v(k.parse_value());
+ std::transform(v->begin(), v->end(), std::back_inserter(texts), &stringify<Maintainer>);
+ }
};
}
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index a78d9fbee..b519c0f08 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -502,6 +502,19 @@ namespace
);
}
+ void visit(const MetadataCollectionKey<Maintainers> & k)
+ {
+ ColourPrettyPrinter printer(env.get(), maybe_current_id, indent);
+ out << fuc(
+ (cmdline.a_raw_names.specified() ? fs_metadata_value_raw() : fs_metadata_value_human()),
+ fv<'s'>(cmdline.a_raw_names.specified() ? k.raw_name() : k.human_name()),
+ fv<'v'>(k.pretty_print_value(printer, basic_ppos)),
+ fv<'i'>(std::string(indent, ' ')),
+ fv<'b'>(important ? "true" : ""),
+ fv<'p'>("")
+ );
+ }
+
void visit(const MetadataCollectionKey<PackageIDSequence> & k)
{
ColourPrettyPrinter printer(env.get(), maybe_current_id, indent);
diff --git a/src/clients/cave/format_plain_metadata_key.cc b/src/clients/cave/format_plain_metadata_key.cc
index a2699d697..8587a1cef 100644
--- a/src/clients/cave/format_plain_metadata_key.cc
+++ b/src/clients/cave/format_plain_metadata_key.cc
@@ -120,6 +120,11 @@ namespace
s << k.pretty_print_value(UnformattedPrettyPrinter(), { });
}
+ void visit(const MetadataCollectionKey<Maintainers> & k)
+ {
+ s << k.pretty_print_value(UnformattedPrettyPrinter(), { });
+ }
+
void visit(const MetadataCollectionKey<Sequence<std::string> > & k)
{
s << k.pretty_print_value(UnformattedPrettyPrinter(), { });