[Lemon-commits] [lemon_svn] alpar: r304 - hugo/trunk/src/work/alpar
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:38:37 CET 2006
Author: alpar
Date: Fri Mar 19 21:58:39 2004
New Revision: 304
Modified:
hugo/trunk/src/work/alpar/mapskeleton.h
hugo/trunk/src/work/alpar/smart_graph.h
Log:
get() -> operator[]()
Modified: hugo/trunk/src/work/alpar/mapskeleton.h
==============================================================================
--- hugo/trunk/src/work/alpar/mapskeleton.h (original)
+++ hugo/trunk/src/work/alpar/mapskeleton.h Fri Mar 19 21:58:39 2004
@@ -18,7 +18,7 @@
ReadMapSkeleton() {}
///Reads an element of the map.
- ValueType get(const KeyType &i) const {return ValueType();}
+ ValueType operator[](const KeyType &i) const {return ValueType();}
};
@@ -70,8 +70,9 @@
ReferenceMapSkeleton(const ValueType &t) : ReadWriteMapSkeleton(t) {}
///Give a reference to the value belonging to a key.
- ValueType &operator[](const KeyType &i) {return *(ValueType*)0;}
- // const ValueType &operator[](const KeyType &i) const {return *(T*)0;}
+ ValueType &operator[](const KeyType &i) {return *(ValueType*)0;}
+ ///Give a const reference to the value belonging to a key.
+ const ValueType &operator[](const KeyType &i) const {return *(T*)0;}
};
Modified: hugo/trunk/src/work/alpar/smart_graph.h
==============================================================================
--- hugo/trunk/src/work/alpar/smart_graph.h (original)
+++ hugo/trunk/src/work/alpar/smart_graph.h Fri Mar 19 21:58:39 2004
@@ -374,7 +374,7 @@
void erase(const Node k) { }
void set(Node n, T a) { container[n.n]=a; }
- T get(Node n) const { return container[n.n]; }
+ //T get(Node n) const { return container[n.n]; }
T& operator[](Node n) { return container[n.n]; }
const T& operator[](Node n) const { return container[n.n]; }
@@ -461,7 +461,7 @@
void erase(const Edge k) { }
void set(Edge n, T a) { container[n.n]=a; }
- T get(Edge n) const { return container[n.n]; }
+ //T get(Edge n) const { return container[n.n]; }
T& operator[](Edge n) { return container[n.n]; }
const T& operator[](Edge n) const { return container[n.n]; }
@@ -603,7 +603,7 @@
void erase(const Edge k) { }
void set(Edge n, T a) { container[n.idref()/2]=a; }
- T get(Edge n) const { return container[n.idref()/2]; }
+ //T get(Edge n) const { return container[n.idref()/2]; }
T& operator[](Edge n) { return container[n.idref()/2]; }
const T& operator[](Edge n) const { return container[n.idref()/2]; }
More information about the Lemon-commits
mailing list