library of assembled shared sources

http://lass.cocamware.com

lass::stde::vector_map< Key, T, Compare, Allocator > Class Template Reference

a map-like container built on a sorted vector (write-rarely, read-many) More...

#include <vector_map.h>


Data Structures

class  value_compare

Public Types

typedef Key key_type
typedef T mapped_type
typedef std::pair< const Key, Tvalue_type
typedef Compare key_compare
typedef Allocator::template
rebind< value_type >::other 
allocator_type
typedef Allocator::reference reference
typedef Allocator::const_reference const_reference
typedef Allocator::pointer pointer
typedef Allocator::const_pointer const_pointer
typedef Allocator::size_type size_type
typedef Allocator::difference_type difference_type
typedef std::vector
< value_type, Allocator
vector_type
typedef vector_type::iterator iterator
typedef vector_type::const_iterator const_iterator
typedef
vector_type::reverse_iterator 
reverse_iterator
typedef
vector_type::const_reverse_iterator 
const_reverse_iterator

Public Member Functions

 vector_map (const key_compare &key_comp, const allocator_type &allocator=Allocator())
template<typename InputIterator >
 vector_map (InputIterator first, InputIterator last, const key_compare &key_comp, const allocator_type &allocator=Allocator())
 vector_map (const vector_map< Key, T, Compare, Allocator > &other)
 ~vector_map ()
vector_map< Key, T, Compare,
Allocator > & 
operator= (const vector_map< Key, T, Compare, Allocator > &other)
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
mapped_typeoperator[] (const key_type &x)
std::pair< iterator, pool > insert (const value_type &x)
iterator insert (iterator position, const value_type &x)
template<typename InputIterator >
void insert (InputIterator first, InputIterator last)
void erase (iterator position)
size_type erase (const key_type &x)
void erase (iterator first, iterator last)
void swap (vector_map< Key, T, Compare, Allocator > &other)
void clear ()
key_compare key_comp () const
value_compare value_comp () const
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
std::pair< iterator, iteratorequal_range (const key_type &x)
std::pair< const_iterator,
const_iterator
equal_range (const key_type &x) const

Private Attributes

vector_type data_
key_compare key_comp_

Related Functions

(Note that these are not member functions.)

template<typename K , typename T , typename C , typename A >
bool operator== (const vector_map< K, T, C, A > &a, const vector_map< K, T, C, A > &b)
template<typename K , typename T , typename C , typename A >
bool operator< (const vector_map< K, T, C, A > &a, const vector_map< K, T, C, A > &b)
template<typename K , typename T , typename C , typename A >
bool operator> (const vector_map< K, T, C, A > &a, const vector_map< K, T, C, A > &b)
template<typename K , typename T , typename C , typename A >
bool operator<= (const vector_map< K, T, C, A > &a, const vector_map< K, T, C, A > &b)
template<typename K , typename T , typename C , typename A >
bool operator>= (const vector_map< K, T, C, A > &a, const vector_map< K, T, C, A > &b)
template<typename K , typename T , typename C , typename A , typename Char , typename Traits >
std::basic_ostream< Char,
Traits > & 
operator<< (std::basic_ostream< Char, Traits > &ostream, vector_map< K, T, C, A > &container)
template<typename Char , typename Traits , typename K , typename T , typename C , typename A >
std::basic_istream< Char,
Traits > & 
operator>> (std::basic_istream< Char, Traits > &istream, vector_map< K, T, C, A > &container)


Detailed Description

template<typename Key, typename T, typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
class lass::stde::vector_map< Key, T, Compare, Allocator >

a map-like container built on a sorted vector (write-rarely, read-many)

Author:
Bram de Greve [Bramz]

Definition at line 65 of file vector_map.h.


Member Typedef Documentation

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Key lass::stde::vector_map< Key, T, Compare, Allocator >::key_type

Definition at line 69 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef T lass::stde::vector_map< Key, T, Compare, Allocator >::mapped_type

Definition at line 70 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef std::pair<const Key, T> lass::stde::vector_map< Key, T, Compare, Allocator >::value_type

Definition at line 71 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Compare lass::stde::vector_map< Key, T, Compare, Allocator >::key_compare

Definition at line 72 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::template rebind<value_type>::other lass::stde::vector_map< Key, T, Compare, Allocator >::allocator_type

Definition at line 74 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::reference lass::stde::vector_map< Key, T, Compare, Allocator >::reference

Definition at line 75 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::const_reference lass::stde::vector_map< Key, T, Compare, Allocator >::const_reference

Definition at line 76 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::pointer lass::stde::vector_map< Key, T, Compare, Allocator >::pointer

Definition at line 77 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::const_pointer lass::stde::vector_map< Key, T, Compare, Allocator >::const_pointer

Definition at line 78 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::size_type lass::stde::vector_map< Key, T, Compare, Allocator >::size_type

Definition at line 79 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef Allocator::difference_type lass::stde::vector_map< Key, T, Compare, Allocator >::difference_type

Definition at line 80 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef std::vector<value_type, Allocator> lass::stde::vector_map< Key, T, Compare, Allocator >::vector_type

Definition at line 82 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef vector_type::iterator lass::stde::vector_map< Key, T, Compare, Allocator >::iterator

Definition at line 83 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef vector_type::const_iterator lass::stde::vector_map< Key, T, Compare, Allocator >::const_iterator

Definition at line 84 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef vector_type::reverse_iterator lass::stde::vector_map< Key, T, Compare, Allocator >::reverse_iterator

Definition at line 85 of file vector_map.h.

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
typedef vector_type::const_reverse_iterator lass::stde::vector_map< Key, T, Compare, Allocator >::const_reverse_iterator

Definition at line 86 of file vector_map.h.


Constructor & Destructor Documentation

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
lass::stde::vector_map< Key, T, Compare, Allocator >::vector_map ( const key_compare key_comp,
const allocator_type allocator = Allocator() 
) [explicit]

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
template<typename InputIterator >
lass::stde::vector_map< Key, T, Compare, Allocator >::vector_map ( InputIterator  first,
InputIterator  last,
const key_compare key_comp,
const allocator_type allocator = Allocator() 
) [inline]

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
lass::stde::vector_map< Key, T, Compare, Allocator >::vector_map ( const vector_map< Key, T, Compare, Allocator > &  other  ) 

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
A lass::stde::vector_map< K, T, C, A >::~vector_map (  )  [inline]

Definition at line 83 of file vector_map.inl.


Member Function Documentation

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
vector_map<Key, T, Compare, Allocator>& lass::stde::vector_map< Key, T, Compare, Allocator >::operator= ( const vector_map< Key, T, Compare, Allocator > &  other  ) 

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::iterator lass::stde::vector_map< K, T, C, A >::begin (  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_iterator lass::stde::vector_map< K, T, C, A >::begin (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::iterator lass::stde::vector_map< K, T, C, A >::end (  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_iterator lass::stde::vector_map< K, T, C, A >::end (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::reverse_iterator lass::stde::vector_map< K, T, C, A >::rbegin (  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_reverse_iterator lass::stde::vector_map< K, T, C, A >::rbegin (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::reverse_iterator lass::stde::vector_map< K, T, C, A >::rend (  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_reverse_iterator lass::stde::vector_map< K, T, C, A >::rend (  )  const [inline]

template<typename K , typename T , typename C , typename A >
bool lass::stde::vector_map< K, T, C, A >::empty (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::size_type lass::stde::vector_map< K, T, C, A >::size (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::size_type lass::stde::vector_map< K, T, C, A >::max_size (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::mapped_type & lass::stde::vector_map< K, T, C, A >::operator[] ( const key_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
std::pair< typename vector_map< K, T, C, A >::iterator, bool > lass::stde::vector_map< K, T, C, A >::insert ( const value_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::iterator lass::stde::vector_map< K, T, C, A >::insert ( iterator  position,
const value_type x 
) [inline]

template<typename K , typename T , typename C , typename A >
template<typename InputIterator >
void lass::stde::vector_map< K, T, C, A >::insert ( InputIterator  first,
InputIterator  last 
) [inline]

template<typename K , typename T , typename C , typename A >
void lass::stde::vector_map< K, T, C, A >::erase ( iterator  position  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::size_type lass::stde::vector_map< K, T, C, A >::erase ( const key_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
void lass::stde::vector_map< K, T, C, A >::erase ( iterator  first,
iterator  last 
) [inline]

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
void lass::stde::vector_map< Key, T, Compare, Allocator >::swap ( vector_map< Key, T, Compare, Allocator > &  other  ) 

template<typename K , typename T , typename C , typename A >
void lass::stde::vector_map< K, T, C, A >::clear (  )  [inline]

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
key_compare lass::stde::vector_map< Key, T, Compare, Allocator >::key_comp (  )  const

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::value_compare lass::stde::vector_map< K, T, C, A >::value_comp (  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::iterator lass::stde::vector_map< K, T, C, A >::find ( const key_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_iterator lass::stde::vector_map< K, T, C, A >::find ( const key_type x  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::size_type lass::stde::vector_map< K, T, C, A >::count ( const key_type x  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::iterator lass::stde::vector_map< K, T, C, A >::lower_bound ( const key_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_iterator lass::stde::vector_map< K, T, C, A >::lower_bound ( const key_type x  )  const [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::iterator lass::stde::vector_map< K, T, C, A >::upper_bound ( const key_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
vector_map< K, T, C, A >::const_iterator lass::stde::vector_map< K, T, C, A >::upper_bound ( const key_type x  )  const [inline]

template<typename K , typename T , typename C , typename A >
std::pair< typename vector_map< K, T, C, A >::iterator, typename vector_map< K, T, C, A >::iterator > lass::stde::vector_map< K, T, C, A >::equal_range ( const key_type x  )  [inline]

template<typename K , typename T , typename C , typename A >
std::pair< typename vector_map< K, T, C, A >::const_iterator, typename vector_map< K, T, C, A >::const_iterator > lass::stde::vector_map< K, T, C, A >::equal_range ( const key_type x  )  const [inline]


Friends And Related Function Documentation

template<typename K , typename T , typename C , typename A >
bool operator== ( const vector_map< K, T, C, A > &  a,
const vector_map< K, T, C, A > &  b 
) [related]

template<typename K , typename T , typename C , typename A >
bool operator< ( const vector_map< K, T, C, A > &  a,
const vector_map< K, T, C, A > &  b 
) [related]

Definition at line 425 of file vector_map.inl.

template<typename K , typename T , typename C , typename A >
bool operator> ( const vector_map< K, T, C, A > &  a,
const vector_map< K, T, C, A > &  b 
) [related]

Definition at line 435 of file vector_map.inl.

template<typename K , typename T , typename C , typename A >
bool operator<= ( const vector_map< K, T, C, A > &  a,
const vector_map< K, T, C, A > &  b 
) [related]

Definition at line 445 of file vector_map.inl.

template<typename K , typename T , typename C , typename A >
bool operator>= ( const vector_map< K, T, C, A > &  a,
const vector_map< K, T, C, A > &  b 
) [related]

Definition at line 455 of file vector_map.inl.

template<typename K , typename T , typename C , typename A , typename Char , typename Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  ostream,
vector_map< K, T, C, A > &  container 
) [related]

Definition at line 466 of file vector_map.inl.

template<typename Char , typename Traits , typename K , typename T , typename C , typename A >
std::basic_istream< Char, Traits > & operator>> ( std::basic_istream< Char, Traits > &  istream,
vector_map< K, T, C, A > &  container 
) [related]

Definition at line 477 of file vector_map.inl.


Field Documentation

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
vector_type lass::stde::vector_map< Key, T, Compare, Allocator >::data_ [private]

template<typename Key , typename T , typename Compare = std::less<Key>, typename Allocator = std::allocator< std::pair<const Key, T> >>
key_compare lass::stde::vector_map< Key, T, Compare, Allocator >::key_comp_ [private]


The documentation for this class was generated from the following files:

Generated on Mon Nov 10 14:22:16 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo