6 #define STRINGS_API __declspec(dllexport)
8 #define STRINGS_API __declspec(dllimport)
11 template<
typename KeyType,
typename ValueType>
struct BlamMapPair
17 template<
typename KeyType,
typename ValueType>
class BlamMap
20 std::vector<BlamMapPair<KeyType, ValueType>> internal_map = std::vector<BlamMapPair<KeyType, ValueType>>();
28 BlamMap(std::map<KeyType, ValueType> std_map)
30 internal_map = std_map;
35 return internal_map.size();
38 ValueType
At(KeyType key)
48 throw std::exception(
"Map did not contain any item with matching key. Use Contains() before calling to ensure safety.");
55 return internal_map.at(index);
58 throw std::exception(
"Attempted to fetch a pair with an index that was out of range. Check index against Size() first.");
61 void Add(std::pair<KeyType, ValueType> pair)
65 new_pair.
key = pair.first;
66 new_pair.
value = pair.second;
69 internal_map.push_back(new_pair);
72 void Add(KeyType key, ValueType value)
77 new_pair.
value = value;
80 internal_map.push_back(new_pair);
98 std::vector<KeyType> key_list = std::vector<KeyType>();
102 key_list.push_back(pair.key);