lemon/bits/vector_map.h
changeset 1720 578d8b2b76c6
parent 1703 eb90e3d6bddc
child 1730 fffa6456548a
equal deleted inserted replaced
3:c51ea1f940b2 4:a16fc96d5b4a
    53     typename _Graph, 
    53     typename _Graph, 
    54     typename _Item,    
    54     typename _Item,    
    55     typename _Value
    55     typename _Value
    56     >
    56     >
    57   class VectorMap : public AlterationNotifier<_Item>::ObserverBase {
    57   class VectorMap : public AlterationNotifier<_Item>::ObserverBase {
       
    58   private:
       
    59 		
       
    60     /// The container type of the map.
       
    61     typedef std::vector<_Value> Container;	
       
    62 
    58   public:
    63   public:
    59 
    64 
    60     typedef True AdaptibleTag;
       
    61 		
       
    62     /// The graph type of the map. 
    65     /// The graph type of the map. 
    63     typedef _Graph Graph;
    66     typedef _Graph Graph;
       
    67     /// The reference map tag.
       
    68     typedef True ReferenceMapTag;
       
    69 
    64     /// The key type of the map.
    70     /// The key type of the map.
    65     typedef _Item Key;
    71     typedef _Item Key;
    66     /// The id map type of the map.
       
    67     typedef AlterationNotifier<_Item> Registry;
       
    68     /// The value type of the map.
    72     /// The value type of the map.
    69     typedef _Value Value;
    73     typedef _Value Value;
       
    74     /// The const reference type of the map.
       
    75     typedef typename Container::const_reference ConstReference;
       
    76     /// The reference type of the map.
       
    77     typedef typename Container::reference Reference;
       
    78 
       
    79     typedef const Value ConstValue;
       
    80     typedef Value* Pointer;
       
    81     typedef const Value* ConstPointer;
       
    82 
       
    83     typedef AlterationNotifier<_Item> Registry;
    70 
    84 
    71     /// The map type.
    85     /// The map type.
    72     typedef VectorMap Map;
    86     typedef VectorMap Map;
    73     /// The base class of the map.
    87     /// The base class of the map.
    74     typedef typename Registry::ObserverBase Parent;
    88     typedef typename Registry::ObserverBase Parent;
    75 
       
    76   private:
       
    77 		
       
    78     /// The container type of the map.
       
    79     typedef std::vector<Value> Container;	
       
    80 
       
    81   public:
       
    82 
    89 
    83     /// The reference type of the map;
    90     /// The reference type of the map;
    84     typedef typename Container::reference Reference;
    91     typedef typename Container::reference Reference;
    85     /// The pointer type of the map;
    92     /// The pointer type of the map;
    86     typedef typename Container::pointer Pointer;
    93     typedef typename Container::pointer Pointer;