aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_match.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/cave/cmd_match.cc')
-rw-r--r--src/clients/cave/cmd_match.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 1abf07409..220f150be 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -146,6 +146,11 @@ namespace
throw args::DoHelp("Unknown algoritm '" + algorithm + "'");
}
+ std::string stringify_string_pair(const std::pair<const std::string, std::string> & s)
+ {
+ return s.first + "=" + s.second;
+ }
+
struct SpecTreeAsString
{
std::list<std::string> & texts;
@@ -332,6 +337,11 @@ namespace
std::transform(k.value()->begin(), k.value()->end(), std::back_inserter(texts), &stringify<std::string>);
}
+ void visit(const MetadataCollectionKey<Map<std::string, std::string> > & k)
+ {
+ std::transform(k.value()->begin(), k.value()->end(), std::back_inserter(texts), stringify_string_pair);
+ }
+
void visit(const MetadataCollectionKey<Set<KeywordName> > & k)
{
std::transform(k.value()->begin(), k.value()->end(), std::back_inserter(texts), &stringify<KeywordName>);