COIN-OR::LEMON - Graph Library

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


Ignore:
Timestamp:
10/14/05 12:48:34 (15 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/static_map.h

    r1703 r1719  
    6363    };
    6464
    65     typedef True AdaptibleTag;
     65  private:
    6666               
     67    typedef std::vector<_Value> Container;     
     68
     69  public:
     70
    6771    /// The graph type of the map.
    6872    typedef _Graph Graph;
     73    /// The reference map tag.
     74    typedef True ReferenceMapTag;
     75
    6976    /// The key type of the map.
    7077    typedef _Item Key;
    71     /// The id map type of the map.
    72     typedef AlterationNotifier<_Item> Registry;
    7378    /// The value type of the map.
    7479    typedef _Value Value;
     80    /// The const reference type of the map.
     81    typedef typename Container::const_reference ConstReference;
     82    /// The reference type of the map.
     83    typedef typename Container::reference Reference;
     84
     85    typedef const Value ConstValue;
     86    typedef Value* Pointer;
     87    typedef const Value* ConstPointer;
     88
     89    typedef AlterationNotifier<_Item> Registry;
    7590
    7691    /// The map type.
     
    7893    /// The base class of the map.
    7994    typedef typename Registry::ObserverBase Parent;
    80 
    81   private:
    82                
    83     typedef std::vector<Value> Container;       
    84 
    85   public:
    8695
    8796    /// \brief Constructor to attach the new map into the registry.
     
    141150
    142151  public:
    143 
    144     typedef typename Container::reference Reference;
    145     typedef typename Container::pointer Pointer;
    146     typedef const Value ConstValue;
    147     typedef typename Container::const_reference ConstReference;
    148     typedef typename Container::const_pointer ConstPointer;
    149152
    150153    /// \brief The subcript operator.
Note: See TracChangeset for help on using the changeset viewer.