11template <
typename Key,
typename Value>
16template <
typename Key,
typename Value>
21template <
typename Key,
typename Value>
22bool ThreadSafeMap<Key, Value>::HasElements()
const
27 hasElements = (mMap.size() > 0);
33template <
typename Key,
typename Value>
34bool ThreadSafeMap<Key, Value>::Exists(Key key)
const
39 exists = (mMap.find(key) != mMap.end());
45template <
typename Key,
typename Value>
46void ThreadSafeMap<Key, Value>::Insert(Key key, Value value)
55template <
typename Key,
typename Value>
56bool ThreadSafeMap<Key, Value>::Remove(Key key, Value& value)
61 auto iter = mMap.find(key);
62 if (iter != mMap.end())
77template <
typename Key,
typename Value>
78void ThreadSafeMap<Key, Value>::RemoveAll()
87template <
typename Key,
typename Value>
88bool ThreadSafeMap<Key, Value>::Get(Key key, Value& value)
const
93 auto iter = mMap.find(key);
94 if (iter != mMap.end())
108template <
typename Key,
typename Value>
109void ThreadSafeMap<Key, Value>::GatherAll(std::vector<Value>& values)
const
115 values.resize(mMap.size());
116 auto viter = values.begin();
117 for (
auto const& m : mMap)