Wiselib
|
Builds a map on top of an arbitrary list implementation. More...
#include <map_list.h>
Public Types | |
typedef OsModel_P | OsModel |
typedef OsModel::size_t | size_t |
typedef OsModel::size_t | size_type |
typedef List_P | list_type |
typedef list_type::value_type::first_type | key_type |
typedef list_type::value_type::second_type | mapped_type |
typedef list_type::value_type | value_type |
typedef MapList< OsModel_P, List_P > | self_type |
typedef list_type::value_type | pair_type |
typedef list_type::value_type | list_value_type |
typedef list_type::iterator | iterator |
typedef list_type::const_iterator | const_iterator |
Public Member Functions | |
MapList () | |
~MapList () | |
list_type & | list () |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
bool | empty () const |
size_t | size () const |
mapped_type & | operator[] (const key_type &x) |
pair< iterator, bool > | insert (const value_type &v) |
iterator | insert (iterator pos, const value_type &v) |
void | insert (iterator first, iterator last) |
void | erase (iterator iter) |
void | erase (iterator first, iterator last) |
size_t | erase (const key_type &k) |
void | swap (self_type &other) |
void | clear () |
iterator | find (const key_type &k) |
const_iterator | find (const key_type &k) const |
size_t | count (const key_type &k) const |
Builds a map on top of an arbitrary list implementation.
Note that lookups and insertions are slow ( O(n) ) in this implementatation.
List_P | has to implement List_concept. The value_type of the list is expected to be pair<const key_type, mapped_type> |
typedef list_type::const_iterator wiselib::MapList< OsModel_P, List_P >::const_iterator |
typedef list_type::iterator wiselib::MapList< OsModel_P, List_P >::iterator |
typedef list_type::value_type::first_type wiselib::MapList< OsModel_P, List_P >::key_type |
typedef List_P wiselib::MapList< OsModel_P, List_P >::list_type |
typedef list_type::value_type wiselib::MapList< OsModel_P, List_P >::list_value_type |
typedef list_type::value_type::second_type wiselib::MapList< OsModel_P, List_P >::mapped_type |
typedef OsModel_P wiselib::MapList< OsModel_P, List_P >::OsModel |
typedef list_type::value_type wiselib::MapList< OsModel_P, List_P >::pair_type |
typedef MapList<OsModel_P, List_P> wiselib::MapList< OsModel_P, List_P >::self_type |
typedef OsModel::size_t wiselib::MapList< OsModel_P, List_P >::size_t |
typedef OsModel::size_t wiselib::MapList< OsModel_P, List_P >::size_type |
typedef list_type::value_type wiselib::MapList< OsModel_P, List_P >::value_type |
wiselib::MapList< OsModel_P, List_P >::MapList | ( | ) | [inline] |
wiselib::MapList< OsModel_P, List_P >::~MapList | ( | ) | [inline] |
iterator wiselib::MapList< OsModel_P, List_P >::begin | ( | ) | [inline] |
const_iterator wiselib::MapList< OsModel_P, List_P >::begin | ( | ) | const [inline] |
void wiselib::MapList< OsModel_P, List_P >::clear | ( | void | ) | [inline] |
size_t wiselib::MapList< OsModel_P, List_P >::count | ( | const key_type & | k | ) | const [inline] |
bool wiselib::MapList< OsModel_P, List_P >::empty | ( | ) | const [inline] |
const_iterator wiselib::MapList< OsModel_P, List_P >::end | ( | ) | const [inline] |
iterator wiselib::MapList< OsModel_P, List_P >::end | ( | ) | [inline] |
void wiselib::MapList< OsModel_P, List_P >::erase | ( | iterator | iter | ) | [inline] |
void wiselib::MapList< OsModel_P, List_P >::erase | ( | iterator | first, |
iterator | last | ||
) | [inline] |
size_t wiselib::MapList< OsModel_P, List_P >::erase | ( | const key_type & | k | ) | [inline] |
iterator wiselib::MapList< OsModel_P, List_P >::find | ( | const key_type & | k | ) | [inline] |
const_iterator wiselib::MapList< OsModel_P, List_P >::find | ( | const key_type & | k | ) | const [inline] |
pair<iterator, bool> wiselib::MapList< OsModel_P, List_P >::insert | ( | const value_type & | v | ) | [inline] |
iterator wiselib::MapList< OsModel_P, List_P >::insert | ( | iterator | pos, |
const value_type & | v | ||
) | [inline] |
void wiselib::MapList< OsModel_P, List_P >::insert | ( | iterator | first, |
iterator | last | ||
) | [inline] |
list_type& wiselib::MapList< OsModel_P, List_P >::list | ( | ) | [inline] |
mapped_type& wiselib::MapList< OsModel_P, List_P >::operator[] | ( | const key_type & | x | ) | [inline] |
size_t wiselib::MapList< OsModel_P, List_P >::size | ( | void | ) | const [inline] |
void wiselib::MapList< OsModel_P, List_P >::swap | ( | self_type & | other | ) | [inline] |