1.1 --- a/src/lemon/vector_map.h Fri Mar 25 22:11:28 2005 +0000
1.2 +++ b/src/lemon/vector_map.h Fri Mar 25 23:31:57 2005 +0000
1.3 @@ -20,6 +20,8 @@
1.4 #include <vector>
1.5 #include <algorithm>
1.6
1.7 +#include <lemon/utility.h>
1.8 +#include <lemon/map_iterator.h>
1.9 #include <lemon/alteration_notifier.h>
1.10
1.11 ///\ingroup graphmaps
1.12 @@ -44,9 +46,11 @@
1.13 /// \author Balazs Dezso
1.14
1.15
1.16 - template <typename _Graph,
1.17 - typename _Item,
1.18 - typename _Value>
1.19 + template <
1.20 + typename _Graph,
1.21 + typename _Item,
1.22 + typename _Value
1.23 + >
1.24 class VectorMap : public AlterationNotifier<_Item>::ObserverBase {
1.25 public:
1.26
1.27 @@ -83,6 +87,8 @@
1.28 /// The pointer type of the map;
1.29 typedef typename Container::const_pointer ConstPointer;
1.30
1.31 + typedef True FullTypeTag;
1.32 +
1.33 /// Constructor to attach the new map into the registry.
1.34
1.35 /// It construates a map and attachs it into the registry.
1.36 @@ -205,7 +211,7 @@
1.37 void clear() {
1.38 container.clear();
1.39 }
1.40 -
1.41 +
1.42 private:
1.43
1.44 Container container;
1.45 @@ -232,15 +238,15 @@
1.46 typedef typename Parent::EdgeNotifier EdgeObserverRegistry;
1.47
1.48
1.49 -
1.50 template <typename _Value>
1.51 - class NodeMap : public VectorMap<Graph, Node, _Value> {
1.52 + class NodeMap :
1.53 + public IterableMapExtender<VectorMap<Graph, Node, _Value> > {
1.54 public:
1.55 typedef VectorMappableGraphExtender<_Base> Graph;
1.56
1.57 typedef typename Graph::Node Node;
1.58
1.59 - typedef VectorMap<Graph, Node, _Value> Parent;
1.60 + typedef IterableMapExtender<VectorMap<Graph, Node, _Value> > Parent;
1.61
1.62 //typedef typename Parent::Graph Graph;
1.63 typedef typename Parent::Value Value;
1.64 @@ -253,13 +259,14 @@
1.65 };
1.66
1.67 template <typename _Value>
1.68 - class EdgeMap : public VectorMap<Graph, Edge, _Value> {
1.69 + class EdgeMap
1.70 + : public IterableMapExtender<VectorMap<Graph, Edge, _Value> > {
1.71 public:
1.72 typedef VectorMappableGraphExtender<_Base> Graph;
1.73
1.74 typedef typename Graph::Edge Edge;
1.75
1.76 - typedef VectorMap<Graph, Edge, _Value> Parent;
1.77 + typedef IterableMapExtender<VectorMap<Graph, Edge, _Value> > Parent;
1.78
1.79 //typedef typename Parent::Graph Graph;
1.80 typedef typename Parent::Value Value;