Wiselib
|
Sorted version of an associative container. More...
Inherits concepts::AssociativeContainer_concept.
Public Types | |
typedef mapped_type size_type | erase (const key_type &k) |
Type of values indexed by keys. | |
Public Member Functions | |
key_compare & | key_comp () |
Return the key comparator instance. | |
iterator | lower_bound (key_type k) |
Return an iterator pointing to the first element whose key is not less than k. | |
iterator | upper_bound (key_type k) |
Return an iterator pointing to the first element whose key is greater than k. | |
pair< iterator, iterator > | equal_range (key_type k) |
Return a pair whose first element is lower_bound(k) and whose second element is upper_bound(k). | |
iterator | find (const key_type &k) |
Return an iterator to the element associated to the given key. | |
size_type | count (const key_type &) |
Return number of elements associated with the given key. | |
value_type & | operator[] (const key_type &k) |
Access the element identified by the given key. | |
iterator | begin () |
Return an iterator that points at the first element. | |
iterator | end () |
Return an iterator that points "after" the last element. | |
size_type | size () |
Return number of elements in the container. | |
size_type | max_size () |
Return maximum number of elements in the container. | |
bool | empty () |
Return true if the container is empty. | |
Static Public Member Functions | |
static value_compare | value_compare () |
Return the value comparator instance. | |
Public Attributes | |
typedef | key_compare |
Used to compare keys, has to implement StrictWeakOrdering. | |
typedef | value_compare |
Used to compare values, has to implement StrictWeakOrdering. | |
typedef | key_type |
Type of keys of this container. | |
typedef | value_type |
Type of elements of the container. | |
typedef | iterator |
Type of the iterators returned by begin() and end(). | |
typedef | size_type |
Type of the element-counts returned by size() and maxsize(). |
Sorted version of an associative container.
Sorted Associative Containers use an ordering relation on their keys; two keys are considered to be equivalent if neither one is less than the other.
typedef mapped_type size_type concepts::AssociativeContainer_concept::erase(const key_type &k) [inherited] |
Type of values indexed by keys.
Erase value associated to the given key
iterator concepts::Container_concept::begin | ( | ) | [inherited] |
Return an iterator that points at the first element.
Return number of elements associated with the given key.
bool concepts::Container_concept::empty | ( | ) | [inline, inherited] |
Return true if the container is empty.
iterator concepts::Container_concept::end | ( | ) | [inherited] |
Return an iterator that points "after" the last element.
I.e. dereferencing this iterator does not need to work, but (equality) comparison to any iterator that has finished iterating over all elements of the container should yield true
pair<iterator, iterator> concepts::SortedAssociativeContainer_concept::equal_range | ( | key_type | k | ) | [inline] |
Return a pair whose first element is lower_bound(k) and whose second element is upper_bound(k).
Return an iterator to the element associated to the given key.
key_compare& concepts::SortedAssociativeContainer_concept::key_comp | ( | ) |
Return the key comparator instance.
Return an iterator pointing to the first element whose key is not less than k.
Return end() if no such element exists.
size_type concepts::Container_concept::max_size | ( | ) | [inherited] |
Return maximum number of elements in the container.
If the container is not limited in size, return 0.
value_type& concepts::AssociativeContainer_concept::operator[] | ( | const key_type & | k | ) | [inherited] |
Access the element identified by the given key.
size_type concepts::Container_concept::size | ( | ) | [inherited] |
Return number of elements in the container.
Return an iterator pointing to the first element whose key is greater than k.
Return end() if no such element exists.
static value_compare concepts::SortedAssociativeContainer_concept::value_compare | ( | ) | [static] |
Return the value comparator instance.
typedef concepts::Container_concept::iterator [inherited] |
Used to compare keys, has to implement StrictWeakOrdering.
Argument type has to be X::key_type.
typedef concepts::AssociativeContainer_concept::key_type [inherited] |
Type of keys of this container.
typedef concepts::Container_concept::size_type [inherited] |
Type of the element-counts returned by size() and maxsize().
Usually an (unsigned) integer type.
Used to compare values, has to implement StrictWeakOrdering.
Argument type has to be X::value_type. Comparators of this type shall compare two objects of type value_type by passing their keys to an instance of X::key_compare.
typedef concepts::Container_concept::value_type [inherited] |
Type of elements of the container.