Lines Matching defs:key
50 /// constructor given a pointer to a key storage
79 void add_key(const Key& key)
81 keys->insert({key, timestamp++});
84 void remove_key(const Key& key)
86 keys->erase(key);
157 T& at(const Key& key)
159 return m_map.at(key);
163 const T& at(const Key& key) const
165 return m_map.at(key);
169 T& operator[](const Key& key)
171 m_compare.add_key(key);
172 return m_map[key];
176 T& operator[](Key&& key)
178 m_compare.add_key(key);
179 return m_map[key];
382 /// remove elements with key
383 size_type erase(const key_type& key)
385 size_type res = m_map.erase(key);
389 m_compare.remove_key(key);
408 /// returns the number of elements matching specific key
409 size_type count(const Key& key) const
411 return m_map.count(key);
414 /// finds element with specific key
415 iterator find(const Key& key)
417 return m_map.find(key);
420 /// finds element with specific key
421 const_iterator find(const Key& key) const
423 return m_map.find(key);
426 /// returns range of elements matching a specific key
427 std::pair<iterator, iterator> equal_range(const Key& key)
429 return m_map.equal_range(key);
432 /// returns range of elements matching a specific key
433 std::pair<const_iterator, const_iterator> equal_range(const Key& key) const
435 return m_map.equal_range(key);
438 /// returns an iterator to the first element not less than the given key
439 iterator lower_bound(const Key& key)
441 return m_map.lower_bound(key);
444 /// returns an iterator to the first element not less than the given key
445 const_iterator lower_bound(const Key& key) const
447 return m_map.lower_bound(key);
450 /// returns an iterator to the first element greater than the given key
451 iterator upper_bound(const Key& key)
453 return m_map.upper_bound(key);
456 /// returns an iterator to the first element greater than the given key
457 const_iterator upper_bound(const Key& key) const
459 return m_map.upper_bound(key);