Sierra Toolkit
Version of the Day
|
Vector-based std::map functionality. More...
#include <VecMap.hpp>
Public Member Functions | |
vecmap (const vecmap< Key, T, Compare > &rhs) | |
vecmap< Key, T, Compare > & | operator= (const vecmap< Key, T, Compare > &rhs) |
void | swap (vecmap< Key, T, Compare > &v) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
bool | empty () const |
size_type | size () const |
size_type | max_size () const |
std::vector< value_type_unconst_key >::iterator | lower_bound_private_comp_ (const key_type &k) |
std::pair< iterator, bool > | insert (const value_type &v) |
mapped_type & | operator[] (const key_type &k) |
void | erase (iterator i) |
void | erase (iterator first, iterator last) |
size_type | erase (const key_type &k) |
void | clear () |
key_compare | key_comp () const |
value_compare | value_comp () const |
iterator | lower_bound (const key_type &k) |
const_iterator | lower_bound (const key_type &k) const |
iterator | upper_bound (const key_type &k) |
const_iterator | upper_bound (const key_type &k) const |
iterator | find (const key_type &k) |
const_iterator | find (const key_type &k) const |
size_type | count (const key_type &k) const |
operator const std::vector< value_type > & () const | |
operator const std::vector< std::pair< key_type, mapped_type > > & () const | |
void | reserve (size_type n) |
bool | operator== (const vecmap< Key, T, Compare > &rhs) const |
bool | operator!= (const vecmap< Key, T, Compare > &rhs) const |
Vector-based std::map functionality.
This template class mimics the 'std::map' associative container interface; however, its semantics are significantly different. Storage for the map-lite class is provided by the std::vector class where the entries are sorted by key value.
Light weight associative container functionality for small keys and values, e.g. key = integer and value = pointer.
Modifications to the vecmap contents are linear complexity in violation of the associative container requirement for logarithmic complexity. Furthermore, modification operations are guaranteed to invalidate all iterators after the insert/erase point. Insertion operations may also invalidate all iterators if the storage is reallocated.
All non-modifying query operations conform to either the constant or logarithmic complexity.
Definition at line 60 of file VecMap.hpp.