StdMap Class Template Reference

#include <maps.h>

List of all members.


Detailed Description

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

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

Todo:
Provide allocator parameter...

Definition at line 118 of file maps.h.

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 !
Definition at line 137 of file maps.h.

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

Warning:
Inefficient: copies the content of m !
Definition at line 142 of file maps.h.


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!
Definition at line 167 of file maps.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:38 2004 for LEMON by doxygen 1.3.8