aboutsummaryrefslogtreecommitdiff
path: root/paludis/stringify_formatter.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-07 21:28:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-07 21:28:26 +0000
commite15f518956383d4dc22bee5c13939f8de247a46d (patch)
treed1760116d2e5e29a7f47c3504319d13bd3e8f48a /paludis/stringify_formatter.cc
parent8294cd0acad913897cb79aba7d94144254fdb4f3 (diff)
downloadpaludis-e15f518956383d4dc22bee5c13939f8de247a46d.tar.gz
paludis-e15f518956383d4dc22bee5c13939f8de247a46d.tar.xz
Add Map<string, string> keys
Diffstat (limited to 'paludis/stringify_formatter.cc')
-rw-r--r--paludis/stringify_formatter.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/paludis/stringify_formatter.cc b/paludis/stringify_formatter.cc
index ab6061f36..beb0fdfa9 100644
--- a/paludis/stringify_formatter.cc
+++ b/paludis/stringify_formatter.cc
@@ -30,6 +30,7 @@ using namespace paludis;
StringifyFormatter::StringifyFormatter() :
Pimp<StringifyFormatter>(
static_cast<const CanFormat<std::string> *>(0),
+ static_cast<const CanFormat<std::pair<const std::string, std::string> > *>(0),
static_cast<const CanFormat<ChoiceValue> *>(0),
static_cast<const CanFormat<KeywordName> *>(0),
static_cast<const CanFormat<PackageDepSpec> *>(0),
@@ -63,6 +64,14 @@ StringifyFormatter::format(const std::string & s, const format::Plain & k) const
}
std::string
+StringifyFormatter::format(const std::pair<const std::string, std::string> & s, const format::Plain & k) const
+{
+ if (_imp->f_str)
+ return _imp->f_str_str->format(s, k);
+ return s.first + "=" + s.second;
+}
+
+std::string
StringifyFormatter::format(const KeywordName & s, const format::Accepted & k) const
{
if (_imp->f_keyword)