lemon/vmap.h
changeset 2293 1ee6e8788cc7
parent 1978 ef2d00e46897
child 2391 14a343be7a5a
equal deleted inserted replaced
0:afc5591e4320 1:cc4db5ee3b64
    57     virtual Value& operator[](const Key &) const = 0;
    57     virtual Value& operator[](const Key &) const = 0;
    58     ///\e
    58     ///\e
    59     virtual void set(const Key &,const Value &) = 0;
    59     virtual void set(const Key &,const Value &) = 0;
    60   };
    60   };
    61   
    61   
    62   ///Makes a virtual map from a \ref concept::ReadMap "ReadMap"
    62   ///Makes a virtual map from a \ref concepts::ReadMap "ReadMap"
    63   template<class M, class K=typename M::Key,class V=typename M::Value>
    63   template<class M, class K=typename M::Key,class V=typename M::Value>
    64   class VReadMap : public VMapBase<K,V> 
    64   class VReadMap : public VMapBase<K,V> 
    65   {
    65   {
    66     const M &map;
    66     const M &map;
    67   public:
    67   public:
    72 
    72 
    73   ///Function interface for \ref VReadMap.
    73   ///Function interface for \ref VReadMap.
    74   template<class M, class K=typename M::Key,class V=typename M::Value>
    74   template<class M, class K=typename M::Key,class V=typename M::Value>
    75   vReadMap(const M& m) {return VReadMap<M,K,V>(m);}
    75   vReadMap(const M& m) {return VReadMap<M,K,V>(m);}
    76 
    76 
    77   ///Makes a virtual map from a \ref concept::WriteMap "WriteMap"
    77   ///Makes a virtual map from a \ref concepts::WriteMap "WriteMap"
    78   template<class M, class K=typename M::Key,class V=typename M::Value>
    78   template<class M, class K=typename M::Key,class V=typename M::Value>
    79   class VWriteMap :public VMapBase<K,V> 
    79   class VWriteMap :public VMapBase<K,V> 
    80   {
    80   {
    81     M &map;
    81     M &map;
    82   public:
    82   public:
    87 
    87 
    88   ///Function interface for \ref VWriteMap.
    88   ///Function interface for \ref VWriteMap.
    89   template<class M, class K=typename M::Key,class V=typename M::Value>
    89   template<class M, class K=typename M::Key,class V=typename M::Value>
    90   vWriteMap(const M& m) {return VReadMap<M,K,V>(m);}
    90   vWriteMap(const M& m) {return VReadMap<M,K,V>(m);}
    91 
    91 
    92   ///Makes a virtual map from a \ref concept::ReadWriteMap "ReadWriteMap"
    92   ///Makes a virtual map from a \ref concepts::ReadWriteMap "ReadWriteMap"
    93   template<class M, class K=typename M::Key,class V=typename M::Value>
    93   template<class M, class K=typename M::Key,class V=typename M::Value>
    94   class VReadWriteMap :public VMapBase<K,V>
    94   class VReadWriteMap :public VMapBase<K,V>
    95   {
    95   {
    96     M &map;
    96     M &map;
    97   public:
    97   public: