StdMap Class Template Reference
[Maps]

#include <lemon/maps.h>

List of all members.


Detailed Description

template<typename K, typename T, typename Compare = std::less<K>>
class lemon::StdMap< K, T, Compare >

This is essentially a wrapper for std::map. With addition that you can specify a default value different from Value() .

Todo:
Provide allocator parameter...


Public Types

typedef K Key
 
typedef T Value
 
typedef T & Reference
 
typedef const T & ConstReference
 

Public Member Functions

 StdMap (const T &_v)
 Constructor with specified default value.
 StdMap (const parent &m)
 Constructs the map from an appropriate std::map.
 StdMap (const parent &m, const T &_v)
 Constructs the map from an appropriate std::map, and explicitly specifies a default value.
setDefault (const T &_v)


Constructor & Destructor Documentation

StdMap ( const parent &  m  )  [inline]

Warning:
Inefficient: copies the content of m !

StdMap ( const parent &  m,
const T &  _v 
) [inline]

Warning:
Inefficient: copies the content of m !


Member Function Documentation

T setDefault ( const T &  _v  )  [inline]

Changes the default value of the map.

Returns:
Returns the previous default value.
Warning:
The value of some keys (which has already been queried, but the value has been unchanged from the default) may change!


The documentation for this class was generated from the following file:
Generated on Tue Oct 31 09:51:03 2006 for LEMON by  doxygen 1.5.1