Superfluous parts removed
authorklao
Sat, 03 Apr 2004 18:41:46 +0000
changeset 2842d4684f76aac
parent 283 91e78d9b78f4
child 285 0bc5f7f66bfa
Superfluous parts removed
src/include/skeletons/maps.h
     1.1 --- a/src/include/skeletons/maps.h	Sat Apr 03 18:22:08 2004 +0000
     1.2 +++ b/src/include/skeletons/maps.h	Sat Apr 03 18:41:46 2004 +0000
     1.3 @@ -10,29 +10,9 @@
     1.4    /// The namespace of HUGOlib concepts and concept checking classes
     1.5    namespace skeleton {
     1.6    
     1.7 -    /// Null map concept
     1.8 -    template<typename K, typename T>
     1.9 -    class NullMap
    1.10 -    {
    1.11 -    public:
    1.12 -      /// Map's key type.
    1.13 -      typedef K KeyType;    
    1.14 -      /// Map's value type. (The type of objects associated with the keys).
    1.15 -      typedef T ValueType;
    1.16 -
    1.17 -      /// Facility to define a map with an other value type
    1.18 -      template<typename T1>
    1.19 -      struct rebind {
    1.20 -	/// The type of a map with the given value type
    1.21 -	typedef NullMap<K,T1> other;
    1.22 -      };
    1.23 -
    1.24 -      NullMap() {}
    1.25 -    };
    1.26 -    
    1.27      /// Readable map concept
    1.28      template<typename K, typename T>
    1.29 -    class ReadableMap : public NullMap<K,T>
    1.30 +    class ReadableMap
    1.31      {
    1.32      public:
    1.33        /// Map's key type.
    1.34 @@ -48,24 +28,13 @@
    1.35        /// Assignment operator. (optional)
    1.36        ReadableMap& operator=(const ReadableMap&) {return *this;}
    1.37  
    1.38 -      /// Facility to define a map with an other value type (optional)
    1.39 -      template<typename T1>
    1.40 -      struct rebind {
    1.41 -	/// The type of a map with the given value type
    1.42 -	typedef ReadableMap<K,T1> other;
    1.43 -      };
    1.44 -      /// @brief Constructor that copies all keys from the other map and
    1.45 -      /// assigns to them a default value (optional)
    1.46 -      template<typename T1>
    1.47 -      ReadableMap(const ReadableMap<K,T1> &map, const T1 &v) {}
    1.48 -
    1.49        ReadableMap() {}
    1.50      };
    1.51  
    1.52  
    1.53      /// Writable map concept
    1.54      template<typename K, typename T>
    1.55 -    class WritableMap : public NullMap<K,T>
    1.56 +    class WritableMap
    1.57      {
    1.58      public:
    1.59        /// Map's key type.
    1.60 @@ -76,22 +45,6 @@
    1.61        /// Sets the value associated with a key.
    1.62        void set(const KeyType &k,const ValueType &t) {}
    1.63  
    1.64 -      /// Copy contsructor. (optional)
    1.65 -      WritableMap(const WritableMap&) {}
    1.66 -      /// Assignment operator. (optional)
    1.67 -      WritableMap& operator=(const WritableMap&) {return *this;}
    1.68 -
    1.69 -      /// Facility to define a map with an other value type (optional)
    1.70 -      template<typename T1>
    1.71 -      struct rebind {
    1.72 -	/// The type of a map with the given value type
    1.73 -	typedef WritableMap<K,T1> other;
    1.74 -      };
    1.75 -      /// @brief Constructor that copies all keys from the other map and
    1.76 -      /// assigns to them a default value (optional)
    1.77 -      template<typename T1>
    1.78 -      WritableMap(const WritableMap<K,T1> &map, const T1 &v) {}
    1.79 -
    1.80        WritableMap() {}
    1.81      };
    1.82