15#include <unordered_map>
21template<
class Key,
class T,
class Hash = std::hash<Key>>
30template<
class Key,
class T,
class Hash = std::hash<Key>>
33 for (
auto it = aMap.begin(); it != aMap.end(); ++it) {
41template<
class Key,
class T,
class Hash = std::hash<Key>>
42void SetMappedValuesToMap(
const std::unordered_map<Key, T, Hash>& inMap, std::unordered_map<Key, T, Hash>& aMap)
44 for (
auto it = aMap.begin(); it != aMap.end(); ++it) {
45 if (inMap.find(it->first) != inMap.end()) {
46 it->second = inMap.at(it->first);
53template<
class Key,
class T,
class Hash = std::hash<Key>>
56 std::stringstream token;
57 for (
auto it = aMap.begin(); it != aMap.end(); ++it) {
58 token << std::setw(entryWidth) << std::setfill(
' ') << it->second <<
' ';
std::string RepresentMapWithString(const std::unordered_map< Key, T, Hash > &aMap, int entryWidth=15)
void SetSingleValueToMap(Key key, T value, std::unordered_map< Key, T, Hash > &aMap)
void SetSameValueToMap(T value, std::unordered_map< Key, T, Hash > &aMap)
void SetMappedValuesToMap(const std::unordered_map< Key, T, Hash > &inMap, std::unordered_map< Key, T, Hash > &aMap)