ConstMap< K, Const< V, v > > Class Template Reference

- Main Page
- Modules
- Classes
- Namespaces
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Types | Public Member Functions
ConstMap< K, Const< V, v > > Class Template Reference
Maps

## Detailed Description

### template<typename K, typename V, V v>
class lemon::ConstMap< K, Const< V, v > >

This readable map assigns a specified value to each key.

In other aspects it is equivalent to `NullMap`. So it conforms to the ReadWriteMap concept, but it absorbs the data written to it.

The simplest way of using this map is through the constMap() function.

See Also
  NullMap
  IdentityMap

`#include <lemon/maps.h>`

Inheritance diagram for ConstMap< K, Const< V, v > >:
[legend]

## Public Types
typedef K | Key
typedef V | Value
Public Types inherited from MapBase< K, V >
typedef K | Key
| The key type of the map.
typedef V | Value
| The value type of the map. (The type of objects associated with the keys).

## Public Member Functions
| ConstMap ()
| Constructor.
Value | operator[] (const Key &) const
| Gives back the specified value.
void | set (const Key &, const Value &)
| Absorbs the value.