21 std::map<std::string, std::string> aMap;
25 for (MultimapType::iterator it = fileExtensionsMap.begin(); it != fileExtensionsMap.end(); ++it)
27 std::string aValue = aMap[(*it).second];
28 if (aValue.compare(
"") != 0)
32 aValue.append((*it).first);
33 aMap[(*it).second] = aValue;
39 fileExtensions =
"known extensions (";
40 std::string lastKey =
"";
41 for (MultimapType::iterator it = fileExtensionsMap.begin(); it != fileExtensionsMap.end(); ++it)
43 std::string aKey = (*it).first;
45 if (aKey.compare(lastKey) != 0)
47 if (lastKey.compare(
"") != 0)
49 fileExtensions.append(
" ");
51 fileExtensions.append(aKey);
55 fileExtensions.append(
");;all (*);;");
59 for (std::map<std::string, std::string>::iterator it = aMap.begin(); it != aMap.end(); ++it)
62 std::string aKey = (*it).first;
63 if (aKey.compare(
"") != 0)
65 fileExtensions.append((*it).first);
66 fileExtensions.append(
" (");
67 fileExtensions.append((*it).second);
68 fileExtensions.append(
");;");
static void CreateFileExtensions(MultimapType fileExtensionsMap, std::string &fileExtensions)
create a string from a map that contains the file extensions
std::multimap< std::string, std::string > MultimapType