aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/accounts/accounts_dep_key.cc
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/accounts/accounts_dep_key.cc
parentcdaf7c2138035625d99ee5be127f427943b66e09 (diff)
downloadpaludis-3dd53676acf85d7b3d9758f2def081d20c00b3b9.tar.gz
paludis-3dd53676acf85d7b3d9758f2def081d20c00b3b9.tar.xz
Better pretty printing mechanism
Diffstat (limited to 'paludis/repositories/accounts/accounts_dep_key.cc')
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/paludis/repositories/accounts/accounts_dep_key.cc b/paludis/repositories/accounts/accounts_dep_key.cc
index d208bee2b..d7d3aec1d 100644
--- a/paludis/repositories/accounts/accounts_dep_key.cc
+++ b/paludis/repositories/accounts/accounts_dep_key.cc
@@ -32,6 +32,7 @@
#include <paludis/util/pimp-impl.hh>
#include <paludis/partially_made_package_dep_spec.hh>
#include <paludis/always_enabled_dependency_label.hh>
+#include <paludis/pretty_printer.hh>
#include <sstream>
#include <list>
@@ -155,3 +156,22 @@ AccountsDepKey::pretty_print_flat(const DependencySpecTree::ItemFormatter & f) c
return s.str();
}
+const std::string
+AccountsDepKey::pretty_print_value(
+ const PrettyPrinter & pretty_printer,
+ const PrettyPrintOptions &) const
+{
+ std::stringstream s;
+
+ for (std::list<std::shared_ptr<PackageDepSpec> >::const_iterator i(_imp->specs->begin()),
+ i_end(_imp->specs->end()) ; i != i_end ; ++i)
+ {
+ if (! s.str().empty())
+ s << ", ";
+
+ s << pretty_printer.prettify(**i);
+ }
+
+ return s.str();
+}
+