Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

Oscl_Map< Key, T, Alloc, Compare > Class Template Reference
[OSCL Base]

#include <oscl_map.h>


Public Types

typedef Key key_type
typedef Compare key_compare
typedef Oscl_Pair< const Key,
T > 
value_type
typedef Oscl_Map< Key, T,
Alloc, Compare > 
self
typedef rep_type::pointer 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::size_type size_type
typedef Oscl_Pair< iterator,
bool > 
pair_iterator_bool
typedef Oscl_Pair< iterator,
iterator
pair_iterator_iterator
typedef Oscl_Pair< const_iterator,
const_iterator
pair_citerator_citerator

Public Methods

 Oscl_Map (const Compare &comp=Compare())
 Oscl_Map (const self &x)
selfoperator= (const self &x)
key_compare key_comp () const
value_compare value_comp () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
bool empty () const
size_type size () const
size_type max_size () const
T & operator[] (const key_type &k)
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 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_iterator equal_range (const key_type &x)
pair_citerator_citerator equal_range (const key_type &x) const


Detailed Description

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
class Oscl_Map< Key, T, Alloc, Compare >

Oscl_Map Class. A subset of STL::Map methods. Oscl_Map is a sorted associative container that associates objects of type Key with objects of type T. It is also a unique associative container, meaning that no two elements have the same key. Oscl_Map uses the key to speed lookup, insertion, and deletion of elements. It is often superior to all other containers when you need to lookup an element by key value. Due to the underlying tree structure, inserts and erases can be performed in logarithmic time, where a vector would take linear time in some cases.


Member Typedef Documentation

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef rep_type::const_iterator Oscl_Map< Key, T, Alloc, Compare >::const_iterator
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef rep_type::const_reference Oscl_Map< Key, T, Alloc, Compare >::const_reference
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef rep_type::iterator Oscl_Map< Key, T, Alloc, Compare >::iterator
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Compare Oscl_Map< Key, T, Alloc, Compare >::key_compare
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Key Oscl_Map< Key, T, Alloc, Compare >::key_type
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Oscl_Pair<const_iterator, const_iterator> Oscl_Map< Key, T, Alloc, Compare >::pair_citerator_citerator
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Oscl_Pair<iterator, bool> Oscl_Map< Key, T, Alloc, Compare >::pair_iterator_bool
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Oscl_Pair<iterator, iterator> Oscl_Map< Key, T, Alloc, Compare >::pair_iterator_iterator
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef rep_type::pointer Oscl_Map< Key, T, Alloc, Compare >::pointer
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef rep_type::reference Oscl_Map< Key, T, Alloc, Compare >::reference
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Oscl_Map<Key, T, Alloc, Compare> Oscl_Map< Key, T, Alloc, Compare >::self
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef rep_type::size_type Oscl_Map< Key, T, Alloc, Compare >::size_type
 

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
typedef Oscl_Pair<const Key, T> Oscl_Map< Key, T, Alloc, Compare >::value_type
 


Constructor & Destructor Documentation

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
Oscl_Map< Key, T, Alloc, Compare >::Oscl_Map const Compare &    comp = Compare() [inline]
 

Creates an empty map using comp as the key compare object

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
Oscl_Map< Key, T, Alloc, Compare >::Oscl_Map const self   x [inline]
 

Oscl_Map copy constructor


Member Function Documentation

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
const_iterator Oscl_Map< Key, T, Alloc, Compare >::begin   const [inline]
 

Returns a const iterator pointing to the beginning of the map

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
iterator Oscl_Map< Key, T, Alloc, Compare >::begin   [inline]
 

Returns an iterator pointing to the beginning of the map

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
void Oscl_Map< Key, T, Alloc, Compare >::clear   [inline]
 

Erases all elements

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
size_type Oscl_Map< Key, T, Alloc, Compare >::count const key_type   x const [inline]
 

Returns the number of elements with key x. For map this will either be 0 or 1.

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
bool Oscl_Map< Key, T, Alloc, Compare >::empty   const [inline]
 

Returns true if map size is 0

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
const_iterator Oscl_Map< Key, T, Alloc, Compare >::end   const [inline]
 

Returns a const iterator pointing to the end of the map.

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
iterator Oscl_Map< Key, T, Alloc, Compare >::end   [inline]
 

Returns an iterator pointing to the end of the map.

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
pair_citerator_citerator Oscl_Map< Key, T, Alloc, Compare >::equal_range const key_type   x const [inline]
 

Finds a range containing all elements whose key is x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
pair_iterator_iterator Oscl_Map< Key, T, Alloc, Compare >::equal_range const key_type   x [inline]
 

Finds a range containing all elements whose key is x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
void Oscl_Map< Key, T, Alloc, Compare >::erase iterator    first,
iterator    last
[inline]
 

Erases all elements in the range [first,last)

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
size_type Oscl_Map< Key, T, Alloc, Compare >::erase const key_type   x [inline]
 

Erases the element with key x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
void Oscl_Map< Key, T, Alloc, Compare >::erase iterator    position [inline]
 

Erases the element pointed to by position

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
const_iterator Oscl_Map< Key, T, Alloc, Compare >::find const key_type   x const [inline]
 

Finds an element whose key is x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
iterator Oscl_Map< Key, T, Alloc, Compare >::find const key_type   x [inline]
 

Finds an element whose key is x

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

Inserts the range [first,last) into the map

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

Inserts x into the map using position as a hint as to where it should be inserted

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
pair_iterator_bool Oscl_Map< Key, T, Alloc, Compare >::insert const value_type   x [inline]
 

Inserts x into the map

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
key_compare Oscl_Map< Key, T, Alloc, Compare >::key_comp   const [inline]
 

Returns the key compare object used by the map

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
const_iterator Oscl_Map< Key, T, Alloc, Compare >::lower_bound const key_type   x const [inline]
 

Finds the first element whose key is not less than x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
iterator Oscl_Map< Key, T, Alloc, Compare >::lower_bound const key_type   x [inline]
 

Finds the first element whose key is not less than x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
size_type Oscl_Map< Key, T, Alloc, Compare >::max_size   const [inline]
 

Returns the maximum possible size of the map

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
self& Oscl_Map< Key, T, Alloc, Compare >::operator= const self   x [inline]
 

Oscl_Map assignment operator

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
T& Oscl_Map< Key, T, Alloc, Compare >::operator[] const key_type   k [inline]
 

Returns a reference to the object that is associated with a particular key. If the map does not already contain such an object, operator[] inserts the default object value_type().

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
size_type Oscl_Map< Key, T, Alloc, Compare >::size   const [inline]
 

Returns the size of the map

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
const_iterator Oscl_Map< Key, T, Alloc, Compare >::upper_bound const key_type   x const [inline]
 

Finds the first element whose key is not greater than x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
iterator Oscl_Map< Key, T, Alloc, Compare >::upper_bound const key_type   x [inline]
 

Finds the first element whose key is not greater than x

template<class Key, class T, class Alloc, class Compare = Oscl_Less<Key>>
value_compare Oscl_Map< Key, T, Alloc, Compare >::value_comp   const [inline]
 

Returns the value compare object used by the map


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310