aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 23:25:05 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 23:25:05 +0000
commit8a2209af5322271d8741d8add2f9f965b30a6455 (patch)
treec1ca8dcf2c152223d610b43f19d6925d69d2f920 /src/clients/cave
parentcd3a942035f61f0d42b743698209236c83747e78 (diff)
downloadpaludis-8a2209af5322271d8741d8add2f9f965b30a6455.tar.gz
paludis-8a2209af5322271d8741d8add2f9f965b30a6455.tar.xz
MetadataSpecTreeKey<RequiredUseSpecTree>
Diffstat (limited to 'src/clients/cave')
-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.cc6
-rw-r--r--src/clients/cave/cmd_show.cc27
-rw-r--r--src/clients/cave/format_plain_metadata_key.cc6
5 files changed, 51 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index d6b4884f7..7993d5ed1 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -973,6 +973,12 @@ namespace
cout << fuc(fs_mask_by(), fv<'i'>(indent), fv<'k'>(k.human_name()), fv<'v'>(stringify(k.pretty_print_flat(formatter))));
}
+ void visit(const MetadataSpecTreeKey<RequiredUseSpecTree> & k)
+ {
+ ColourFormatter formatter(0);
+ cout << fuc(fs_mask_by(), fv<'i'>(indent), fv<'k'>(k.human_name()), fv<'v'>(stringify(k.pretty_print_flat(formatter))));
+ }
+
void visit(const MetadataValueKey<std::shared_ptr<const Choices> > & k)
{
ColourFormatter formatter(0);
diff --git a/src/clients/cave/cmd_info.cc b/src/clients/cave/cmd_info.cc
index 0a5e2bf14..66e56d9bf 100644
--- a/src/clients/cave/cmd_info.cc
+++ b/src/clients/cave/cmd_info.cc
@@ -209,6 +209,12 @@ namespace
cout << fuc(fs_metadata(), fv<'h'>(k.human_name()), fv<'i'>(std::string(indent, ' ')), fv<'s'>(k.pretty_print_flat(f)));
}
+ void visit(const MetadataSpecTreeKey<RequiredUseSpecTree> & k)
+ {
+ ColourFormatter f(indent);
+ cout << fuc(fs_metadata(), fv<'h'>(k.human_name()), fv<'i'>(std::string(indent, ' ')), fv<'s'>(k.pretty_print_flat(f)));
+ }
+
void visit(const MetadataSpecTreeKey<FetchableURISpecTree> & k)
{
ColourFormatter f(indent);
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 18c2f9b3d..907d3629d 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -300,6 +300,12 @@ namespace
k.value()->top()->accept(m);
}
+ void visit(const MetadataSpecTreeKey<RequiredUseSpecTree> & k)
+ {
+ SpecTreeAsString m = { texts, match_options };
+ k.value()->top()->accept(m);
+ }
+
void visit(const MetadataSpecTreeKey<DependencySpecTree> & k)
{
SpecTreeAsString m = { texts, match_options };
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index e56024eea..555e56609 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -508,6 +508,33 @@ namespace
}
}
+ void visit(const MetadataSpecTreeKey<RequiredUseSpecTree> & k)
+ {
+ if (cmdline.a_complex_keys.specified() || important)
+ {
+ ColourFormatter f(indent);
+ if (cmdline.a_flat.specified())
+ 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_flat(f)),
+ fv<'i'>(std::string(indent, ' ')),
+ fv<'b'>(important ? "true" : "")
+ );
+ else
+ {
+ 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'>(""),
+ fv<'i'>(std::string(indent, ' ')),
+ fv<'b'>(important ? "true" : "")
+ );
+ out << k.pretty_print(f);
+ }
+ }
+ }
+
void visit(const MetadataSpecTreeKey<FetchableURISpecTree> & k)
{
if (cmdline.a_complex_keys.specified() || important)
diff --git a/src/clients/cave/format_plain_metadata_key.cc b/src/clients/cave/format_plain_metadata_key.cc
index e469f9328..8394b13a2 100644
--- a/src/clients/cave/format_plain_metadata_key.cc
+++ b/src/clients/cave/format_plain_metadata_key.cc
@@ -117,6 +117,12 @@ namespace
s << k.pretty_print_flat(f);
}
+ void visit(const MetadataSpecTreeKey<RequiredUseSpecTree> & k)
+ {
+ StringifyFormatter f;
+ s << k.pretty_print_flat(f);
+ }
+
void visit(const MetadataSpecTreeKey<SimpleURISpecTree> & k)
{
StringifyFormatter f;