COIN-OR::LEMON - Graph Library

Changeset 720:193d881b23ad in lemon-0.x


Ignore:
Timestamp:
07/21/04 19:38:02 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@974
Message:

MapBase? added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/maps.h

    r539 r720  
    1313namespace hugo {
    1414
     15  /// Base class of maps.
     16
     17  template<typename K, typename T>
     18  class MapBase
     19  {
     20  public:
     21    ///
     22    typedef K KeyType;
     23    ///
     24    typedef T ValueType;
     25  };
     26
    1527  /// Null map. (aka DoNothingMap)
    1628
     
    1931  /// data written to it...
    2032  template<typename K, typename T>
    21   class NullMap
     33  class NullMap : public MapBase<K,T>
    2234  {
    2335  public:
    24     typedef K KeyType;
    25     typedef T ValueType;
    2636
    2737    T operator[](const K&) const { return T(); }
     
    3848  /// In other aspects it is equivalent to the \ref NullMap
    3949  template<typename K, typename T>
    40   class ConstMap
     50  class ConstMap : public MapBase<K,T>
    4151  {
    4252    T v;
    4353  public:
    44     typedef K KeyType;
    45     typedef T ValueType;
    4654
    4755    ConstMap() {}
Note: See TracChangeset for help on using the changeset viewer.