StdMap< K, T, Compare > Class Template Reference
[Maps]
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() . It meets the
ReferenceMap concept.
#include <lemon/maps.h>
List of all members.
|
Public Types |
|
typedef Parent::Key | Key |
| | Key type.
|
|
typedef Parent::Value | Value |
| | Value type.
|
|
typedef T & | Reference |
| | Reference Type.
|
|
typedef const T & | ConstReference |
| | Const reference type.
|
Public Member Functions |
|
| StdMap (const T &value=T()) |
| | Constructor with specified default value.
|
|
template<typename T1 , typename Comp1 > |
| | StdMap (const std::map< Key, T1, Comp1 > &map, const T &value=T()) |
| | Constructs the map from an appropriate std::map, and explicitly specifies a default value.
|
|
template<typename T1 , typename Comp1 > |
| | StdMap (const StdMap< Key, T1, Comp1 > &c) |
| | Constructs a map from an other StdMap.
|
|
Reference | operator[] (const Key &k) |
| |
|
|
ConstReference | operator[] (const Key &k) const |
| |
|
|
void | set (const Key &k, const T &t) |
| |
|
|
void | setAll (const T &t) |
| |
|
Related Functions |
(Note that these are not member functions.)
|
| template<typename K , typename V , typename Compare > |
| StdMap< K, V, Compare > | stdMap (const V &value=V()) |
| | Returns a StdMap class.
|
| template<typename K , typename V , typename Compare > |
| StdMap< K, V, Compare > | stdMap (const std::map< K, V, Compare > &map, const V &value=V()) |
| | Returns a StdMap class created from an appropriate std::map.
|