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

mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator > Class Template Reference

#include <map.hh>

Inheritance diagram for mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >:

mpcl::io::TStreamableMap< TKey, TItem, TCompare, TItemAllocator > List of all members.

Public Methods

 TMap (void)
 Builds a new instance.

 TMap (const TCompare &rktCOMPARE)
 Builds a new instance.

template<typename InputIterator>  TMap (InputIterator tBEGIN, InputIterator tEND)
 Builds a new instance.

template<typename InputIterator>  TMap (InputIterator tBEGIN, InputIterator tEND, const TCompare &rktCOMPARE)
 Builds a new instance.

 TMap (const std::map< TKey, TItem, TCompare, TItemAllocator > &rktSOURCE_MAP)
 Builds a new instance.

TMap & operator= (const TMap &rktSOURCE_MAP)
TMap & bind (const TKey &rktKEY, const TItem &rktITEM)
bool isBound (const key_type &rktKEY) const
TItem & operator[] (const key_type &rktKEY)
const TItem & operator[] (const key_type &rktKEY) const

Detailed Description

template<typename TKey, typename TItem, typename TCompare = std::less<TKey>, typename TItemAllocator = std::allocator<TItem>>
class mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >

Extended map.

Warning:
This class follow the naming conventions used in STL classes.

Definition at line 54 of file map.hh.


Member Function Documentation

template<typename TKey, typename TItem, typename TCompare = std::less<TKey>, typename TItemAllocator = std::allocator<TItem>>
TMap& mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >::bind const TKey &    rktKEY,
const TItem &    rktITEM
[inline]
 

Inserts a new pair in the map.

Parameters:
rktKEY  Key.
rktITEM  Item.
Returns:
This instance.

Definition at line 163 of file map.hh.

template<typename TKey, typename TItem, typename TCompare = std::less<TKey>, typename TItemAllocator = std::allocator<TItem>>
bool mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >::isBound const key_type &    rktKEY const [inline]
 

Return true if the map contains a key like rktKEY.

Parameters:
rktKEY  Key.
Returns:
True if the map contains a key like rktKEY.

Definition at line 181 of file map.hh.

template<typename TKey, typename TItem, typename TCompare = std::less<TKey>, typename TItemAllocator = std::allocator<TItem>>
TMap& mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >::operator= const TMap< TKey, TItem, TCompare, TItemAllocator > &    rktSOURCE_MAP [inline]
 

Copies another map onto this instance.

Parameters:
rktSOURCE_MAP  Source map.
Returns:
This instance.

Definition at line 151 of file map.hh.

template<typename TKey, typename TItem, typename TCompare = std::less<TKey>, typename TItemAllocator = std::allocator<TItem>>
const TItem& mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >::operator[] const key_type &    rktKEY const [inline]
 

Returns the item bound to key rktKEY.

Parameters:
rktKEY  Key.
Returns:
The item bound to key rktKEY.

Definition at line 207 of file map.hh.

template<typename TKey, typename TItem, typename TCompare = std::less<TKey>, typename TItemAllocator = std::allocator<TItem>>
TItem& mpcl::util::collection::TMap< TKey, TItem, TCompare, TItemAllocator >::operator[] const key_type &    rktKEY [inline]
 

Returns the item bound to key rktKEY.

Parameters:
rktKEY  Key.
Returns:
The item bound to key rktKEY.

Definition at line 191 of file map.hh.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:27 2003 for MPCL by doxygen1.2.18