Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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...

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

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

Warning:
Inefficient: copies the content of m !

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


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:58:53 2005 for LEMON by  doxygen 1.4.1