COIN-OR::LEMON - Graph Library

Changeset 284:2d4684f76aac in lemon-0.x


Ignore:
Timestamp:
04/03/04 20:41:46 (20 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@398
Message:

Superfluous parts removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/include/skeletons/maps.h

    r282 r284  
    1111  namespace skeleton {
    1212 
    13     /// Null map concept
    14     template<typename K, typename T>
    15     class NullMap
    16     {
    17     public:
    18       /// Map's key type.
    19       typedef K KeyType;   
    20       /// Map's value type. (The type of objects associated with the keys).
    21       typedef T ValueType;
    22 
    23       /// Facility to define a map with an other value type
    24       template<typename T1>
    25       struct rebind {
    26         /// The type of a map with the given value type
    27         typedef NullMap<K,T1> other;
    28       };
    29 
    30       NullMap() {}
    31     };
    32    
    3313    /// Readable map concept
    3414    template<typename K, typename T>
    35     class ReadableMap : public NullMap<K,T>
     15    class ReadableMap
    3616    {
    3717    public:
     
    4929      ReadableMap& operator=(const ReadableMap&) {return *this;}
    5030
    51       /// Facility to define a map with an other value type (optional)
    52       template<typename T1>
    53       struct rebind {
    54         /// The type of a map with the given value type
    55         typedef ReadableMap<K,T1> other;
    56       };
    57       /// @brief Constructor that copies all keys from the other map and
    58       /// assigns to them a default value (optional)
    59       template<typename T1>
    60       ReadableMap(const ReadableMap<K,T1> &map, const T1 &v) {}
    61 
    6231      ReadableMap() {}
    6332    };
     
    6635    /// Writable map concept
    6736    template<typename K, typename T>
    68     class WritableMap : public NullMap<K,T>
     37    class WritableMap
    6938    {
    7039    public:
     
    7645      /// Sets the value associated with a key.
    7746      void set(const KeyType &k,const ValueType &t) {}
    78 
    79       /// Copy contsructor. (optional)
    80       WritableMap(const WritableMap&) {}
    81       /// Assignment operator. (optional)
    82       WritableMap& operator=(const WritableMap&) {return *this;}
    83 
    84       /// Facility to define a map with an other value type (optional)
    85       template<typename T1>
    86       struct rebind {
    87         /// The type of a map with the given value type
    88         typedef WritableMap<K,T1> other;
    89       };
    90       /// @brief Constructor that copies all keys from the other map and
    91       /// assigns to them a default value (optional)
    92       template<typename T1>
    93       WritableMap(const WritableMap<K,T1> &map, const T1 &v) {}
    9447
    9548      WritableMap() {}
Note: See TracChangeset for help on using the changeset viewer.