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>

Inherits map< K, T, Compare >.

Inheritance diagram for StdMap:

Inheritance graph
[legend]
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 Sat Aug 27 14:16:08 2005 for LEMON by  doxygen 1.4.4