Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

map Class Template Reference

#include <stl_map.h>

Collaboration diagram for map:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Key key_type
typedef T data_type
typedef T mapped_type
typedef pair< const Key, T > value_type
typedef Compare key_compare
typedef rep_type::pointer pointer
typedef rep_type::const_pointer const_pointer
typedef rep_type::reference reference
typedef rep_type::const_reference const_reference
typedef rep_type::iterator iterator
typedef rep_type::const_iterator const_iterator
typedef rep_type::reverse_iterator reverse_iterator
typedef rep_type::const_reverse_iterator const_reverse_iterator
typedef rep_type::size_type size_type
typedef rep_type::difference_type difference_type

Public Methods

 map ()
 map (const Compare &comp)
 map (const value_type *first, const value_type *last)
 map (const value_type *first, const value_type *last, const Compare &comp)
 map (const_iterator first, const_iterator last)
 map (const_iterator first, const_iterator last, const Compare &comp)
 map (const map< Key, T, Compare, Alloc > &x)
map< Key, T, Compare, Alloc > & operator= (const map< Key, T, Compare, Alloc > &x)
key_compare key_comp () const
value_compare value_comp () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
bool empty () const
size_type size () const
size_type max_size () const
T & operator[] (const key_type &k)
void swap (map< Key, T, Compare, Alloc > &x)
pair< iterator, bool > insert (const value_type &x)
iterator insert (iterator position, const value_type &x)
void insert (const value_type *first, const value_type *last)
void insert (const_iterator first, const_iterator last)
void erase (iterator position)
size_type erase (const key_type &x)
void erase (iterator first, iterator last)
void clear ()
iterator find (const key_type &x)
const_iterator find (const key_type &x) const
size_type count (const key_type &x) const
iterator lower_bound (const key_type &x)
const_iterator lower_bound (const key_type &x) const
iterator upper_bound (const key_type &x)
const_iterator upper_bound (const key_type &x) const
pair< iterator, iteratorequal_range (const key_type &x)
pair< const_iterator, const_iteratorequal_range (const key_type &x) const

Private Types

typedef rb_tree< key_type,
value_type, select1st< value_type >,
key_compare, Alloc > 
rep_type

Private Attributes

rep_type t

Friends

bool operator==__STL_NULL_TMPL_ARGS (const map &, const map &)
bool operator<__STL_NULL_TMPL_ARGS (const map &, const map &)

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
class map< Key, T, Compare, Alloc >


Member Typedef Documentation

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::const_iterator map::const_iterator
 

Definition at line 78 of file stl_map.h.

Referenced by begin, end, find, insert, lower_bound, map, and upper_bound.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::const_pointer map::const_pointer
 

Definition at line 74 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::const_reference map::const_reference
 

Definition at line 76 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::const_reverse_iterator map::const_reverse_iterator
 

Definition at line 80 of file stl_map.h.

Referenced by rbegin, and rend.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef T map::data_type
 

Definition at line 51 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::difference_type map::difference_type
 

Definition at line 82 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::iterator map::iterator
 

Definition at line 77 of file stl_map.h.

Referenced by begin, end, erase, find, insert, lower_bound, and upper_bound.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef Compare map::key_compare
 

Definition at line 54 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef Key map::key_type
 

Definition at line 50 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef T map::mapped_type
 

Definition at line 52 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::pointer map::pointer
 

Definition at line 73 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::reference map::reference
 

Definition at line 75 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rb_tree<key_type, value_type, select1st<value_type>, key_compare, Alloc> map::rep_type [private]
 

Definition at line 70 of file stl_map.h.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::reverse_iterator map::reverse_iterator
 

Definition at line 79 of file stl_map.h.

Referenced by rbegin, and rend.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef rep_type::size_type map::size_type
 

Definition at line 81 of file stl_map.h.

Referenced by count, erase, max_size, and size.

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
typedef pair<const Key, T> map::value_type
 

Definition at line 53 of file stl_map.h.

Referenced by operator[].


Constructor & Destructor Documentation

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map   [inline]
 

Definition at line 86 of file stl_map.h.

00086 : t(Compare()) {}

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map const Compare &    comp [inline, explicit]
 

Definition at line 87 of file stl_map.h.

00087 : t(comp) {}

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map const value_type   first,
const value_type   last
[inline]
 

Definition at line 98 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

00099     : t(Compare()) { t.insert_unique(first, last); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map const value_type   first,
const value_type   last,
const Compare &    comp
[inline]
 

Definition at line 100 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

00101     : t(comp) { t.insert_unique(first, last); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map const_iterator    first,
const_iterator    last
[inline]
 

Definition at line 103 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

00104     : t(Compare()) { t.insert_unique(first, last); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map const_iterator    first,
const_iterator    last,
const Compare &    comp
[inline]
 

Definition at line 105 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

00106     : t(comp) { t.insert_unique(first, last); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map< Key, T, Compare, Alloc >::map const map< Key, T, Compare, Alloc > &    x [inline]
 

Definition at line 109 of file stl_map.h.

00109 : t(x.t) {}


Member Function Documentation

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_iterator map< Key, T, Compare, Alloc >::begin   const [inline]
 

Definition at line 121 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::begin, and const_iterator.

00121 { return t.begin(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
iterator map< Key, T, Compare, Alloc >::begin   [inline]
 

Definition at line 120 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::begin, and iterator.

00120 { return t.begin(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
void map< Key, T, Compare, Alloc >::clear   [inline]
 

Definition at line 159 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::clear.

00159 { t.clear(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
size_type map< Key, T, Compare, Alloc >::count const key_type   x const [inline]
 

Definition at line 165 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::count, and size_type.

00165 { return t.count(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
bool map< Key, T, Compare, Alloc >::empty   const [inline]
 

Definition at line 128 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::empty.

00128 { return t.empty(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_iterator map< Key, T, Compare, Alloc >::end   const [inline]
 

Definition at line 123 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::end.

00123 { return t.end(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
iterator map< Key, T, Compare, Alloc >::end   [inline]
 

Definition at line 122 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::end, and iterator.

00122 { return t.end(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
pair<const_iterator,const_iterator> map< Key, T, Compare, Alloc >::equal_range const key_type   x const [inline]
 

Definition at line 178 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::equal_range.

00178                                                                            {
00179     return t.equal_range(x);
00180   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
pair<iterator,iterator> map< Key, T, Compare, Alloc >::equal_range const key_type   x [inline]
 

Definition at line 175 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::equal_range.

00175                                                          {
00176     return t.equal_range(x);
00177   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
void map< Key, T, Compare, Alloc >::erase iterator    first,
iterator    last
[inline]
 

Definition at line 158 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::erase, and iterator.

00158 { t.erase(first, last); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
size_type map< Key, T, Compare, Alloc >::erase const key_type   x [inline]
 

Definition at line 157 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::erase, and size_type.

00157 { return t.erase(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
void map< Key, T, Compare, Alloc >::erase iterator    position [inline]
 

Definition at line 156 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::erase, and iterator.

00156 { t.erase(position); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_iterator map< Key, T, Compare, Alloc >::find const key_type   x const [inline]
 

Definition at line 164 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::find.

00164 { return t.find(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
iterator map< Key, T, Compare, Alloc >::find const key_type   x [inline]
 

Definition at line 163 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::find, and iterator.

00163 { return t.find(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
void map< Key, T, Compare, Alloc >::insert const_iterator    first,
const_iterator    last
[inline]
 

Definition at line 151 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

00151                                                          {
00152     t.insert_unique(first, last);
00153   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
void map< Key, T, Compare, Alloc >::insert const value_type   first,
const value_type   last
[inline]
 

Definition at line 148 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

00148                                                                {
00149     t.insert_unique(first, last);
00150   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
iterator map< Key, T, Compare, Alloc >::insert iterator    position,
const value_type   x
[inline]
 

Definition at line 139 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique, and iterator.

00139                                                           {
00140     return t.insert_unique(position, x);
00141   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
pair<iterator,bool> map< Key, T, Compare, Alloc >::insert const value_type   x [inline]
 

Definition at line 138 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::insert_unique.

Referenced by operator[].

00138 { return t.insert_unique(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
key_compare map< Key, T, Compare, Alloc >::key_comp   const [inline]
 

Definition at line 118 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::key_comp.

00118 { return t.key_comp(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_iterator map< Key, T, Compare, Alloc >::lower_bound const key_type   x const [inline]
 

Definition at line 167 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::lower_bound.

00167                                                       {
00168     return t.lower_bound(x); 
00169   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
iterator map< Key, T, Compare, Alloc >::lower_bound const key_type   x [inline]
 

Definition at line 166 of file stl_map.h.

References iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::lower_bound.

00166 {return t.lower_bound(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
size_type map< Key, T, Compare, Alloc >::max_size   const [inline]
 

Definition at line 130 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::max_size, and size_type.

00130 { return t.max_size(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
map<Key, T, Compare, Alloc>& map< Key, T, Compare, Alloc >::operator= const map< Key, T, Compare, Alloc > &    x [inline]
 

Definition at line 110 of file stl_map.h.

References t.

00111   {
00112     t = x.t;
00113     return *this; 
00114   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
T& map< Key, T, Compare, Alloc >::operator[] const key_type   k [inline]
 

Definition at line 131 of file stl_map.h.

References insert, and value_type.

00131                                    {
00132     return (*((insert(value_type(k, T()))).first)).second;
00133   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_reverse_iterator map< Key, T, Compare, Alloc >::rbegin   const [inline]
 

Definition at line 125 of file stl_map.h.

References const_reverse_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::rbegin.

00125 { return t.rbegin(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
reverse_iterator map< Key, T, Compare, Alloc >::rbegin   [inline]
 

Definition at line 124 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::rbegin, and reverse_iterator.

00124 { return t.rbegin(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_reverse_iterator map< Key, T, Compare, Alloc >::rend   const [inline]
 

Definition at line 127 of file stl_map.h.

References const_reverse_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::rend.

00127 { return t.rend(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
reverse_iterator map< Key, T, Compare, Alloc >::rend   [inline]
 

Definition at line 126 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::rend, and reverse_iterator.

00126 { return t.rend(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
size_type map< Key, T, Compare, Alloc >::size   const [inline]
 

Definition at line 129 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::size, and size_type.

00129 { return t.size(); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
void map< Key, T, Compare, Alloc >::swap map< Key, T, Compare, Alloc > &    x [inline]
 

Definition at line 134 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::swap, and t.

00134 { t.swap(x.t); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
const_iterator map< Key, T, Compare, Alloc >::upper_bound const key_type   x const [inline]
 

Definition at line 171 of file stl_map.h.

References const_iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::upper_bound.

00171                                                       {
00172     return t.upper_bound(x); 
00173   }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
iterator map< Key, T, Compare, Alloc >::upper_bound const key_type   x [inline]
 

Definition at line 170 of file stl_map.h.

References iterator, and rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::upper_bound.

00170 {return t.upper_bound(x); }

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
value_compare map< Key, T, Compare, Alloc >::value_comp   const [inline]
 

Definition at line 119 of file stl_map.h.

References rb_tree< key_type, value_type, select1st< value_type >, key_compare, Alloc >::key_comp.

00119 { return value_compare(t.key_comp()); }


Friends And Related Function Documentation

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
bool operator<__STL_NULL_TMPL_ARGS const map< Key, T, Compare, Alloc > &   ,
const map< Key, T, Compare, Alloc > &   
[friend]
 

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
bool operator==__STL_NULL_TMPL_ARGS const map< Key, T, Compare, Alloc > &   ,
const map< Key, T, Compare, Alloc > &   
[friend]
 


Member Data Documentation

template<class Key, class T, class Compare = less<Key>, class Alloc = alloc>
rep_type map::t [private]
 

Definition at line 71 of file stl_map.h.

Referenced by operator=, operator==, and swap.


The documentation for this class was generated from the following file:
logo OpenMask

Documentation generated on Thu May 2 15:03:34 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001