Changes in doc.
authoralpar
Mon, 06 Sep 2004 08:22:48 +0000
changeset 80559b8cb2cb2f8
parent 804 6874a72dbdc5
child 806 93246c00cd24
Changes in doc.
src/hugo/maps.h
     1.1 --- a/src/hugo/maps.h	Mon Sep 06 08:21:42 2004 +0000
     1.2 +++ b/src/hugo/maps.h	Mon Sep 06 08:22:48 2004 +0000
     1.3 @@ -14,45 +14,54 @@
     1.4  
     1.5    /// Base class of maps.
     1.6  
     1.7 +  /// Base class of maps.
     1.8 +  /// It provides the necessary <tt>typedef</tt>s required by the map concept.
     1.9    template<typename K, typename T>
    1.10    class MapBase
    1.11    {
    1.12    public:
    1.13 -    ///
    1.14 +    /// .
    1.15      typedef K KeyType;
    1.16 -    ///
    1.17 +    /// .
    1.18      typedef T ValueType;
    1.19    };
    1.20  
    1.21 -  /// Null map. (aka DoNothingMap)
    1.22 +  /// Null map. (a.k.a. DoNothingMap)
    1.23  
    1.24    /// If you have to provide a map only for its type definitions,
    1.25 -  /// or if you have to provide a writable map, but will not use the
    1.26 -  /// data written to it...
    1.27 +  /// or if you have to provide a writable map, but
    1.28 +  /// data written to it will sent to <tt>/dev/null</tt>...
    1.29    template<typename K, typename T>
    1.30    class NullMap : public MapBase<K,T>
    1.31    {
    1.32    public:
    1.33  
    1.34 +    /// Gives back a default constructed element.
    1.35      T operator[](const K&) const { return T(); }
    1.36 +    /// Absorbs the value.
    1.37      void set(const K&, const T&) {}
    1.38 -    ///\bug when update is removed from map concepts by being dynamic
    1.39 -    ///stuffs, this line have to be removed.
    1.40 -    void update() { }
    1.41    };
    1.42  
    1.43  
    1.44    /// Constant map.
    1.45  
    1.46 -  /// This is a readable map which assignes a specified value to each key.
    1.47 -  /// In other aspects it is equivalent to the \ref NullMap
    1.48 +  /// This is a readable map which assigns a specified value to each key.
    1.49 +  /// In other aspects it is equivalent to the \ref NullMap.
    1.50 +  /// \todo set could be used to set the value.
    1.51    template<typename K, typename T>
    1.52    class ConstMap : public MapBase<K,T>
    1.53    {
    1.54      T v;
    1.55    public:
    1.56  
    1.57 +    /// Default constructor
    1.58 +
    1.59 +    /// The value of the map will be uninitialized. 
    1.60 +    /// (More exactly it will be default constructed.)
    1.61      ConstMap() {}
    1.62 +    /// .
    1.63 +
    1.64 +    /// \param _v The initial value of the map.
    1.65      ConstMap(const T &_v) : v(_v) {}
    1.66  
    1.67      T operator[](const K&) const { return v; }
    1.68 @@ -123,7 +132,7 @@
    1.69      /// Changes the default value of the map.
    1.70      /// \return Returns the previous default value.
    1.71      ///
    1.72 -    /// \warning The value of some keys (which has alredy been queried, but
    1.73 +    /// \warning The value of some keys (which has already been queried, but
    1.74      /// the value has been unchanged from the default) may change!
    1.75      T setDefault(const T &_v) { T old=v; v=_v; return old; }
    1.76