COIN-OR::LEMON - Graph Library

Changeset 1719:674182524bd9 in lemon-0.x for lemon/bits/vector_map.h


Ignore:
Timestamp:
10/14/05 12:48:34 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2246
Message:

Traits moved to own file
Tag for reference maps
Possibility to handle proper the return type
of the operator[]() const -- value or reference

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/vector_map.h

    r1703 r1719  
    5656    >
    5757  class VectorMap : public AlterationNotifier<_Item>::ObserverBase {
     58  private:
     59               
     60    /// The container type of the map.
     61    typedef std::vector<_Value> Container;     
     62
    5863  public:
    5964
    60     typedef True AdaptibleTag;
    61                
    6265    /// The graph type of the map.
    6366    typedef _Graph Graph;
     67    /// The reference map tag.
     68    typedef True ReferenceMapTag;
     69
    6470    /// The key type of the map.
    6571    typedef _Item Key;
    66     /// The id map type of the map.
    67     typedef AlterationNotifier<_Item> Registry;
    6872    /// The value type of the map.
    6973    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;
    7084
    7185    /// The map type.
     
    7387    /// The base class of the map.
    7488    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:
    8289
    8390    /// The reference type of the map;
Note: See TracChangeset for help on using the changeset viewer.