lemon/bits/array_map.h
changeset 664 4137ef9aacc6
parent 525 9605e051942f
child 956 141f9c0db4a3
child 1081 f1398882a928
     1.1 --- a/lemon/bits/array_map.h	Fri Apr 24 10:15:33 2009 +0200
     1.2 +++ b/lemon/bits/array_map.h	Fri Apr 24 11:54:48 2009 +0200
     1.3 @@ -47,7 +47,7 @@
     1.4      : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
     1.5    public:
     1.6      // The graph type.
     1.7 -    typedef _Graph Graph;
     1.8 +    typedef _Graph GraphType;
     1.9      // The item type.
    1.10      typedef _Item Item;
    1.11      // The reference map tag.
    1.12 @@ -63,13 +63,17 @@
    1.13      // The reference type of the map.
    1.14      typedef _Value& Reference;
    1.15  
    1.16 +    // The map type.
    1.17 +    typedef ArrayMap Map;
    1.18 +
    1.19      // The notifier type.
    1.20      typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier;
    1.21  
    1.22 +  private:
    1.23 +  
    1.24      // The MapBase of the Map which imlements the core regisitry function.
    1.25      typedef typename Notifier::ObserverBase Parent;
    1.26  
    1.27 -  private:
    1.28      typedef std::allocator<Value> Allocator;
    1.29  
    1.30    public:
    1.31 @@ -77,7 +81,7 @@
    1.32      // \brief Graph initialized map constructor.
    1.33      //
    1.34      // Graph initialized map constructor.
    1.35 -    explicit ArrayMap(const Graph& graph) {
    1.36 +    explicit ArrayMap(const GraphType& graph) {
    1.37        Parent::attach(graph.notifier(Item()));
    1.38        allocate_memory();
    1.39        Notifier* nf = Parent::notifier();
    1.40 @@ -91,7 +95,7 @@
    1.41      // \brief Constructor to use default value to initialize the map.
    1.42      //
    1.43      // It constructs a map and initialize all of the the map.
    1.44 -    ArrayMap(const Graph& graph, const Value& value) {
    1.45 +    ArrayMap(const GraphType& graph, const Value& value) {
    1.46        Parent::attach(graph.notifier(Item()));
    1.47        allocate_memory();
    1.48        Notifier* nf = Parent::notifier();