Wiselib
Public Types | Public Member Functions
wiselib::MapList< OsModel_P, List_P > Class Template Reference

Builds a map on top of an arbitrary list implementation. More...

#include <map_list.h>

List of all members.

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_typelist ()
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
bool empty () const
size_t size () const
mapped_typeoperator[] (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

Detailed Description

template<typename OsModel_P, typename List_P>
class wiselib::MapList< OsModel_P, List_P >

Builds a map on top of an arbitrary list implementation.

Note that lookups and insertions are slow ( O(n) ) in this implementatation.

Template Parameters:
List_Phas to implement List_concept. The value_type of the list is expected to be pair<const key_type, mapped_type>

Member Typedef Documentation

template<typename OsModel_P , typename List_P >
typedef list_type::const_iterator wiselib::MapList< OsModel_P, List_P >::const_iterator
template<typename OsModel_P , typename List_P >
typedef list_type::iterator wiselib::MapList< OsModel_P, List_P >::iterator
template<typename OsModel_P , typename List_P >
typedef list_type::value_type::first_type wiselib::MapList< OsModel_P, List_P >::key_type
template<typename OsModel_P , typename List_P >
typedef List_P wiselib::MapList< OsModel_P, List_P >::list_type
template<typename OsModel_P , typename List_P >
typedef list_type::value_type wiselib::MapList< OsModel_P, List_P >::list_value_type
template<typename OsModel_P , typename List_P >
typedef list_type::value_type::second_type wiselib::MapList< OsModel_P, List_P >::mapped_type
template<typename OsModel_P , typename List_P >
typedef OsModel_P wiselib::MapList< OsModel_P, List_P >::OsModel
template<typename OsModel_P , typename List_P >
typedef list_type::value_type wiselib::MapList< OsModel_P, List_P >::pair_type
template<typename OsModel_P , typename List_P >
typedef MapList<OsModel_P, List_P> wiselib::MapList< OsModel_P, List_P >::self_type
template<typename OsModel_P , typename List_P >
typedef OsModel::size_t wiselib::MapList< OsModel_P, List_P >::size_t
template<typename OsModel_P , typename List_P >
typedef OsModel::size_t wiselib::MapList< OsModel_P, List_P >::size_type
template<typename OsModel_P , typename List_P >
typedef list_type::value_type wiselib::MapList< OsModel_P, List_P >::value_type

Constructor & Destructor Documentation

template<typename OsModel_P , typename List_P >
wiselib::MapList< OsModel_P, List_P >::MapList ( ) [inline]
template<typename OsModel_P , typename List_P >
wiselib::MapList< OsModel_P, List_P >::~MapList ( ) [inline]

Member Function Documentation

template<typename OsModel_P , typename List_P >
iterator wiselib::MapList< OsModel_P, List_P >::begin ( ) [inline]
template<typename OsModel_P , typename List_P >
const_iterator wiselib::MapList< OsModel_P, List_P >::begin ( ) const [inline]
template<typename OsModel_P , typename List_P >
void wiselib::MapList< OsModel_P, List_P >::clear ( void  ) [inline]
template<typename OsModel_P , typename List_P >
size_t wiselib::MapList< OsModel_P, List_P >::count ( const key_type k) const [inline]
template<typename OsModel_P , typename List_P >
bool wiselib::MapList< OsModel_P, List_P >::empty ( ) const [inline]
template<typename OsModel_P , typename List_P >
const_iterator wiselib::MapList< OsModel_P, List_P >::end ( ) const [inline]
template<typename OsModel_P , typename List_P >
iterator wiselib::MapList< OsModel_P, List_P >::end ( ) [inline]
template<typename OsModel_P , typename List_P >
void wiselib::MapList< OsModel_P, List_P >::erase ( iterator  iter) [inline]
template<typename OsModel_P , typename List_P >
void wiselib::MapList< OsModel_P, List_P >::erase ( iterator  first,
iterator  last 
) [inline]
template<typename OsModel_P , typename List_P >
size_t wiselib::MapList< OsModel_P, List_P >::erase ( const key_type k) [inline]
template<typename OsModel_P , typename List_P >
iterator wiselib::MapList< OsModel_P, List_P >::find ( const key_type k) [inline]
template<typename OsModel_P , typename List_P >
const_iterator wiselib::MapList< OsModel_P, List_P >::find ( const key_type k) const [inline]
template<typename OsModel_P , typename List_P >
pair<iterator, bool> wiselib::MapList< OsModel_P, List_P >::insert ( const value_type v) [inline]
template<typename OsModel_P , typename List_P >
iterator wiselib::MapList< OsModel_P, List_P >::insert ( iterator  pos,
const value_type v 
) [inline]
template<typename OsModel_P , typename List_P >
void wiselib::MapList< OsModel_P, List_P >::insert ( iterator  first,
iterator  last 
) [inline]
template<typename OsModel_P , typename List_P >
list_type& wiselib::MapList< OsModel_P, List_P >::list ( ) [inline]
template<typename OsModel_P , typename List_P >
mapped_type& wiselib::MapList< OsModel_P, List_P >::operator[] ( const key_type x) [inline]
template<typename OsModel_P , typename List_P >
size_t wiselib::MapList< OsModel_P, List_P >::size ( void  ) const [inline]
template<typename OsModel_P , typename List_P >
void wiselib::MapList< OsModel_P, List_P >::swap ( self_type other) [inline]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines