abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
NullMap< K , V > Class Template Reference

Null map. (a.k.a. DoNothingMap). More...

#include <lemon/maps.h>

Inheritance diagram for NullMap< K , V >:

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

Value operator[] (const Key &) const
 Gives back a default constructed element.
void set (const Key &, const Value &)
 Absorbs the value.

(Note that these are not member symbols.)

template< typename K , typename V >
NullMap< K , V > nullMap ()
 Returns a NullMap class.

Detailed Description

template< typename K , typename V >
class lemon::NullMap< K , V >

This map can be used if you have to provide a map only for its type definitions, or if you have to provide a writable map, but data written to it is not required (i.e. it will be sent to /dev/null). It conforms to the ReadWriteMap concept.

See also
ConstMap