COIN-OR::LEMON - Graph Library

Changeset 987:87f7c54892df in lemon-0.x for src/lemon/vector_map.h


Ignore:
Timestamp:
11/13/04 18:07:10 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
Message:

Naming changes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/vector_map.h

    r980 r987  
    5454    typedef _Graph Graph;
    5555    /// The key type of the map.
    56     typedef _Item KeyType;
     56    typedef _Item Key;
    5757    /// The id map type of the map.
    5858    typedef AlterationObserverRegistry<_Item> Registry;
     
    7272  public:
    7373
    74     /// The value type of the map.
    75     typedef Value ValueType;
    7674    /// The reference type of the map;
    77     typedef typename Container::reference ReferenceType;
     75    typedef typename Container::reference Reference;
    7876    /// The pointer type of the map;
    79     typedef typename Container::pointer PointerType;
     77    typedef typename Container::pointer Pointer;
    8078
    8179    /// The const value type of the map.
    82     typedef const Value ConstValueType;
     80    typedef const Value ConstValue;
    8381    /// The const reference type of the map;
    84     typedef typename Container::const_reference ConstReferenceType;
     82    typedef typename Container::const_reference ConstReference;
    8583    /// The pointer type of the map;
    86     typedef typename Container::const_pointer ConstPointerType;
     84    typedef typename Container::const_pointer ConstPointer;
    8785
    8886    /// Constructor to attach the new map into the registry.
     
    151149    /// actual items of the graph.
    152150     
    153     ReferenceType operator[](const KeyType& key) {
     151    Reference operator[](const Key& key) {
    154152      return container[graph->id(key)];
    155153    }
     
    160158    /// actual items of the graph.
    161159     
    162     ConstReferenceType operator[](const KeyType& key) const {
     160    ConstReference operator[](const Key& key) const {
    163161      return container[graph->id(key)];
    164162    }
     
    170168    ///
    171169     
    172     void set(const KeyType& key, const ValueType& value) {
     170    void set(const Key& key, const Value& value) {
    173171      (*this)[key] = value;
    174172    }
     
    179177    /// and it overrides the add() member function of the observer base.
    180178     
    181     void add(const KeyType& key) {
     179    void add(const Key& key) {
    182180      int id = graph->id(key);
    183181      if (id >= (int)container.size()) {
     
    190188    /// Erase a key from the map. It called by the observer registry
    191189    /// and it overrides the erase() member function of the observer base.     
    192     void erase(const KeyType&) {}
     190    void erase(const Key&) {}
    193191
    194192    /// Buildes the map.
Note: See TracChangeset for help on using the changeset viewer.