Share::Map< TKey, TValue, TAllocator > Class Template Reference
[Leight-weight implementation of some STL containers]

STL map. More...

#include <sharelib.h>

List of all members.

Public Member Functions

 Map (size_type htSize=defaultHtSize)
 ~Map ()
void clear ()
const_iterator find (const TKey &key)
 Look up for key in map by key.
TValue & operator[] (const TKey &key)
 indexer
const_iterator begin () const
const_iterator end () const

Classes

class  const_iterator
 STL map const_iterator equivalent. More...
struct  Item


Detailed Description

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
class Share::Map< TKey, TValue, TAllocator >

STL map.

Light-weight implementation of std::map

Parameters:
TKey Type of map key
TValue Type of map value
TAllocator Type of allocator for container. Default is std::allocator. For sharing use Share::Allocator instead.

Definition at line 1196 of file sharelib.h.


Constructor & Destructor Documentation

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
Share::Map< TKey, TValue, TAllocator >::Map ( size_type  htSize = defaultHtSize  )  [inline]

Parameters:
htSize Size of hash table
Note:
This is not standardized constructor.

Definition at line 1214 of file sharelib.h.

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
Share::Map< TKey, TValue, TAllocator >::~Map (  )  [inline]

Definition at line 1326 of file sharelib.h.


Member Function Documentation

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
void Share::Map< TKey, TValue, TAllocator >::clear (  )  [inline]

Remove all items from map.

Definition at line 1334 of file sharelib.h.

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
const_iterator Share::Map< TKey, TValue, TAllocator >::find ( const TKey &  key  )  [inline]

Look up for key in map by key.

Parameters:
key to look up
Returns:
Return iterator of found item, end() if not found.

Definition at line 1353 of file sharelib.h.

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
TValue& Share::Map< TKey, TValue, TAllocator >::operator[] ( const TKey &  key  )  [inline]

indexer

Look up for pair in map by key. New Pair is created if key is not found.

Parameters:
key to look up
Returns:
Return reference to value.

Definition at line 1369 of file sharelib.h.

References Share::Pair< TFirst, TSecond >::first, and Share::Pair< TFirst, TSecond >::second.

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
const_iterator Share::Map< TKey, TValue, TAllocator >::begin (  )  const [inline]

Returns:
Return iterator to begin of map.
Note:
There is no way to get map elements in specified order by const_iterator

Definition at line 1395 of file sharelib.h.

template<class TKey, class TValue, class TAllocator = std::allocator< Pair<TKey, TValue> >>
const_iterator Share::Map< TKey, TValue, TAllocator >::end (  )  const [inline]

Returns:
Return iterator to element behind end of map.
Note:
There is no way to get map elements in specified order by const_iterator

Definition at line 1405 of file sharelib.h.


The documentation for this class was generated from the following file:
Generated on Sun Aug 26 17:43:03 2007 for ShareLibrary by  doxygen 1.5.2