src/work/alpar/mapskeleton.h
changeset 221 d8a67c5b26d1
parent 186 47cd1716870e
child 242 b255f25ad394
equal deleted inserted replaced
0:a6f77a305b58 1:b3b6f13b256a
    16 
    16 
    17     ///Default constructor.
    17     ///Default constructor.
    18     ReadMapSkeleton() {}
    18     ReadMapSkeleton() {}
    19     
    19     
    20     ///Reads an element of the map.
    20     ///Reads an element of the map.
    21     ValueType get(const KeyType &i) const {return ValueType();}
    21     ValueType operator[](const KeyType &i) const {return ValueType();}
    22   };
    22   };
    23 
    23 
    24 
    24 
    25   ///Writeable map skeleton
    25   ///Writeable map skeleton
    26   template<typename K, typename T>
    26   template<typename K, typename T>
    68     ReferenceMapSkeleton() : ReadWriteMapSkeleton() {}
    68     ReferenceMapSkeleton() : ReadWriteMapSkeleton() {}
    69     ///'Fill with' constructor.
    69     ///'Fill with' constructor.
    70     ReferenceMapSkeleton(const ValueType &t) : ReadWriteMapSkeleton(t) {}    
    70     ReferenceMapSkeleton(const ValueType &t) : ReadWriteMapSkeleton(t) {}    
    71 
    71 
    72     ///Give a reference to the value belonging to a key.
    72     ///Give a reference to the value belonging to a key.
    73     ValueType &operator[](const KeyType &i) {return *(ValueType*)0;}
    73     ValueType &operator[](const KeyType &i) {return *(ValueType*)0;} 
    74     //    const ValueType &operator[](const KeyType &i) const {return *(T*)0;}
    74     ///Give a const reference to the value belonging to a key.
       
    75     const ValueType &operator[](const KeyType &i) const {return *(T*)0;}
    75   };
    76   };
    76 
    77 
    77 
    78 
    78 
    79 
    79 }
    80 }