# HG changeset patch # User alpar # Date 1118310394 0 # Node ID 5289afbdb7201b7e1238c64954ba64cd1f330666 # Parent 58d733dd1c988edc4289ce40cbb8568c50e18e2f Trivial doc fixes diff -r 58d733dd1c98 -r 5289afbdb720 lemon/maps.h --- a/lemon/maps.h Thu Jun 09 09:31:28 2005 +0000 +++ b/lemon/maps.h Thu Jun 09 09:46:34 2005 +0000 @@ -146,9 +146,13 @@ typedef typename parent::value_type PairType; public: + ///\e typedef K Key; + ///\e typedef T Value; + ///\e typedef T& Reference; + ///\e typedef const T& ConstReference; @@ -226,7 +230,9 @@ typedef True NeedCopy; + ///\e typedef typename M::Key Key; + ///\e typedef T Value; ///Constructor @@ -271,7 +277,9 @@ typedef True NeedCopy; + ///\e typedef typename M1::Key Key; + ///\e typedef typename M1::Value Value; ///Constructor @@ -318,7 +326,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M::Key Key; + ///\e typedef typename M::Value Value; ///Constructor @@ -356,7 +366,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M1::Key Key; + ///\e typedef typename M1::Value Value; ///Constructor @@ -394,7 +406,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M1::Key Key; + ///\e typedef typename M1::Value Value; ///Constructor @@ -438,7 +452,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M::Key Key; + ///\e typedef typename M::Value Value; ///Constructor @@ -476,7 +492,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M1::Key Key; + ///\e typedef typename M1::Value Value; ///Constructor @@ -522,7 +540,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M2::Key Key; + ///\e typedef typename M1::Value Value; ///Constructor @@ -575,7 +595,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M1::Key Key; + ///\e typedef V Value; ///Constructor @@ -624,7 +646,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M::Key Key; + ///\e typedef typename M::Value Value; ///Constructor @@ -676,7 +700,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M::Key Key; + ///\e typedef typename M::Value Value; ///Constructor @@ -717,7 +743,9 @@ public: typedef True NeedCopy; + ///\e typedef K Key; + ///\e typedef V Value; ///Constructor @@ -756,9 +784,13 @@ public: typedef True NeedCopy; + ///\e typedef typename M::Key argument_type; + ///\e typedef typename M::Value result_type; + ///\e typedef typename M::Key Key; + ///\e typedef typename M::Value Value; ///Constructor @@ -806,7 +838,9 @@ public: typedef True NeedCopy; + ///\e typedef typename M1::Key Key; + ///\e typedef typename M1::Value Value; ///Constructor @@ -831,9 +865,59 @@ return ForkMap(m1,m2); } + + + /* ************* BOOL MAPS ******************* */ + + ///Logical 'not' of a map + + ///This bool \ref concept::ReadMap "read only map" returns the + ///logical negation of + ///value returned by the + ///given map. Its \c Key and will be inherited from \c M, + ///its Value is bool. + + template + class NotMap + { + typename SmartConstReference::Type m; + public: + + typedef True NeedCopy; + ///\e + typedef typename M::Key Key; + ///\e + typedef bool Value; + + ///Constructor + + ///\e + /// + NotMap(const M &_m) : m(_m) {}; + Value operator[](Key k) const {return !m[k];} + }; + + ///Returns a \ref NotMap class + + ///This function just returns a \ref NotMap class. + ///\relates NotMap + template + inline NotMap notMap(const M &m) + { + return NotMap(m); + } + + + + + + + + + + + /// @} - } - #endif // LEMON_MAPS_H