#include <stablemap.h>
Public Types | |
using | value_type = Pair< Key, Val > |
using | iterator = typename TreeT::BasicIterator |
using | const_iterator = typename TreeT::ConstIterator |
Public Member Functions | |
void | clear () |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | lower_bound (const Key &key) const |
iterator | lower_bound (const Key &key) |
iterator | upper_bound (const Key &key) |
iterator | find (const Key &theKey) |
const_iterator | find (const Key &theKey) const |
Val & | operator[] (const Key &theKey) |
iterator | erase (iterator it) |
iterator | erase (iterator first, iterator last) |
size_t | erase (const Key &theKey) |
Pair< iterator, bool > | insert (const value_type &val) |
size_t | size () const |
bool | empty () const |
size_t | count (const Key &key) |
Ordered associative container meant as a drop-in replacement for the C++ standard library's std::map.
using Common::StableMap< Key, Val, CompFunc >::value_type = Pair<Key, Val> |
Type of the value obtained by dereferencing a StableMap iterator.
using Common::StableMap< Key, Val, CompFunc >::iterator = typename TreeT::BasicIterator |
StableMap iterator.
using Common::StableMap< Key, Val, CompFunc >::const_iterator = typename TreeT::ConstIterator |
Const-qualified StableMap iterator.
|
inline |
Clears the contents of the map
|
inline |
Return an iterator pointing to the first element in the map.
|
inline |
Return an iterator pointing to the last element in the map.
|
inline |
Return a const iterator pointing to the first element in the map.
|
inline |
Return a const iterator pointing to the last element in the map.
|
inline |
Returns an iterator to the first item thas is not less than key
in the map (or end() if this cannot be found).
|
inline |
Returns a const iterator to the first item thas is not less than key
in the map (or end() if this cannot be found).
|
inline |
Returns an iterator to the first item bigger than key
in the map (or end() if this cannot be found).
|
inline |
Returns an iterator to the item with the given key, or end() if the item was not found.
|
inline |
Returns a const iterator to the item with the given key, or end() if the item was not found.
|
inline |
Square brackets operator accesses items by key, creating if necessary
|
inline |
Erases the item in the map pointed by it
.
|
inline |
Erase the elements from first
to last
and return an iterator pointing to the next element in the map.
|
inline |
Erases the item with the given key. Returns the number of elements removed (0 or 1)
|
inline |
Tries to insert the value val
in the map. If the value is inserted, the pair (it, true), where it is the iterator to the inserted value, is returned, otherwise (lower_bound(val), false) is returned
|
inline |
Returns the size of the map.
|
inline |
Returns true if the map is empty. Shorthand for:
|
inline |
Returns the number of elements with a matching key