lemon/concepts/maps.h
changeset 28 e337bdf46777
parent 25 751cd8f9bb1c
child 35 f8ddf1b1541a
     1.1 --- a/lemon/concepts/maps.h	Fri Jan 04 02:06:43 2008 +0100
     1.2 +++ b/lemon/concepts/maps.h	Fri Jan 04 03:29:54 2008 +0100
     1.3 @@ -34,6 +34,9 @@
     1.4      /// @{
     1.5  
     1.6      /// Readable map concept
     1.7 +
     1.8 +    /// Readable map concept.
     1.9 +    ///
    1.10      template<typename K, typename T>
    1.11      class ReadMap
    1.12      {
    1.13 @@ -45,7 +48,7 @@
    1.14  
    1.15        /// Returns the value associated with a key.
    1.16  
    1.17 -      /// \bug Value should n't need to be default constructible.
    1.18 +      /// \bug Value shouldn't need to be default constructible.
    1.19        ///
    1.20        Value operator[](const Key &) const {return Value();}
    1.21  
    1.22 @@ -71,6 +74,9 @@
    1.23  
    1.24  
    1.25      /// Writable map concept
    1.26 +    
    1.27 +    /// Writable map concept.
    1.28 +    ///
    1.29      template<typename K, typename T>
    1.30      class WriteMap
    1.31      {
    1.32 @@ -107,7 +113,10 @@
    1.33        };
    1.34      };
    1.35  
    1.36 -    ///Read/Writable map concept
    1.37 +    /// Read/Writable map concept
    1.38 +    
    1.39 +    /// Read/writable map concept.
    1.40 +    ///
    1.41      template<typename K, typename T>
    1.42      class ReadWriteMap : public ReadMap<K,T>,
    1.43  			    public WriteMap<K,T>
    1.44 @@ -133,7 +142,10 @@
    1.45      };
    1.46    
    1.47    
    1.48 -    ///Dereferable map concept
    1.49 +    /// Dereferable map concept
    1.50 +    
    1.51 +    /// Dereferable map concept.
    1.52 +    ///
    1.53      template<typename K, typename T, typename R, typename CR>
    1.54      class ReferenceMap : public ReadWriteMap<K,T>
    1.55      {
    1.56 @@ -156,12 +168,11 @@
    1.57        ///Returns a reference to the value associated to a key.
    1.58        Reference operator[](const Key &) { return tmp; }
    1.59        ///Returns a const reference to the value associated to a key.
    1.60 -      ConstReference operator[](const Key &) const
    1.61 -      { return tmp; }
    1.62 +      ConstReference operator[](const Key &) const { return tmp; }
    1.63        /// Sets the value associated with a key.
    1.64        void set(const Key &k,const Value &t) { operator[](k)=t; }
    1.65  
    1.66 -      // \todo rethink this concept
    1.67 +      /// \todo Rethink this concept. 
    1.68        template<typename _ReferenceMap>
    1.69        struct ReferenceMapConcept {
    1.70  
    1.71 @@ -190,5 +201,7 @@
    1.72      // @}
    1.73  
    1.74    } //namespace concepts
    1.75 +
    1.76  } //namespace lemon
    1.77 +
    1.78  #endif // LEMON_CONCEPT_MAPS_H