aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-30 22:48:34 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-01 03:57:53 +0000
commit3dd53676acf85d7b3d9758f2def081d20c00b3b9 (patch)
tree7214265998b38ce234a4198a4c2b9533aeea5f4d /paludis/repositories/virtuals
parentcdaf7c2138035625d99ee5be127f427943b66e09 (diff)
downloadpaludis-3dd53676acf85d7b3d9758f2def081d20c00b3b9.tar.gz
paludis-3dd53676acf85d7b3d9758f2def081d20c00b3b9.tar.xz
Better pretty printing mechanism
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/package_id.cc9
-rw-r--r--paludis/repositories/virtuals/package_id.hh4
2 files changed, 13 insertions, 0 deletions
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 30f780acc..902850016 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -46,6 +46,7 @@
#include <paludis/filtered_generator.hh>
#include <paludis/partially_made_package_dep_spec.hh>
#include <paludis/always_enabled_dependency_label.hh>
+#include <paludis/pretty_printer.hh>
using namespace paludis;
using namespace paludis::virtuals;
@@ -154,6 +155,14 @@ VirtualsDepKey::pretty_print_flat(const DependencySpecTree::ItemFormatter & f) c
return pretty_print(f);
}
+const std::string
+VirtualsDepKey::pretty_print_value(
+ const PrettyPrinter & pretty_printer,
+ const PrettyPrintOptions &) const
+{
+ return pretty_printer.prettify(*_imp->spec);
+}
+
const std::shared_ptr<const DependenciesLabelSequence>
VirtualsDepKey::initial_labels() const
{
diff --git a/paludis/repositories/virtuals/package_id.hh b/paludis/repositories/virtuals/package_id.hh
index 30513f50f..bd4e984d9 100644
--- a/paludis/repositories/virtuals/package_id.hh
+++ b/paludis/repositories/virtuals/package_id.hh
@@ -57,6 +57,10 @@ namespace paludis
virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string human_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual MetadataKeyType type() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
class VirtualsPackageID :