COIN-OR::LEMON - Graph Library

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


Ignore:
Timestamp:
11/13/04 18:07:10 (18 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/array_map.h

    r980 r987  
    3939   *
    4040   *  The template parameter is the MapRegistry that the maps
    41    *  will belong to and the ValueType.
     41   *  will belong to and the Value.
    4242   */
    4343
     
    5353    typedef _Graph Graph;
    5454    /// The key type of the maps.
    55     typedef _Item KeyType;
     55    typedef _Item Key;
    5656
    5757    typedef AlterationObserverRegistry<_Item> Registry;
     
    6161    typedef _ItemIt KeyIt;
    6262
    63     typedef _Value Value;
    64 
    6563    /// The MapBase of the Map which imlements the core regisitry function.
    6664    typedef typename Registry::ObserverBase Parent;
     
    7068
    7169    /// The value type of the map.
    72     typedef Value ValueType;
     70    typedef _Value Value;
    7371    /// The reference type of the map;
    74     typedef Value& ReferenceType;
     72    typedef Value& Reference;
    7573    /// The pointer type of the map;
    76     typedef Value* PointerType;
     74    typedef Value* Pointer;
    7775
    7876    /// The const value type of the map.
    79     typedef const Value ConstValueType;
     77    typedef const Value ConstValue;
    8078    /// The const reference type of the map;
    81     typedef const Value& ConstReferenceType;
     79    typedef const Value& ConstReference;
    8280    /// The pointer type of the map;
    83     typedef const Value* ConstPointerType;
     81    typedef const Value* ConstPointer;
    8482
    8583
     
    173171     * actual keys of the graph.
    174172     */
    175     ReferenceType operator[](const KeyType& key) {
     173    Reference operator[](const Key& key) {
    176174      int id = graph->id(key);
    177175      return values[id];
     
    182180     * actual keys of the graph.
    183181     */
    184     ConstReferenceType operator[](const KeyType& key) const {
     182    ConstReference operator[](const Key& key) const {
    185183      int id = graph->id(key);
    186184      return values[id];
     
    190188     *  This is a compatibility feature with the not dereferable maps.
    191189     */
    192     void set(const KeyType& key, const ValueType& val) {
     190    void set(const Key& key, const Value& val) {
    193191      (*this)[key] = val;
    194192    }
     
    196194    /** Add a new key to the map. It called by the map registry.
    197195     */
    198     void add(const KeyType& key) {
     196    void add(const Key& key) {
    199197      int id = graph->id(key);
    200198      if (id >= capacity) {
     
    220218    /** Erase a key from the map. It called by the map registry.
    221219     */
    222     void erase(const KeyType& key) {
     220    void erase(const Key& key) {
    223221      int id = graph->id(key);
    224222      allocator.destroy(&(values[id]));
     
    322320//     typedef Iterator iterator;
    323321//     typedef ConstIterator const_iterator;
    324 //     typedef typename Iterator::PairValueType value_type;
    325 //     typedef typename Iterator::KeyType key_type;
    326 //     typedef typename Iterator::ValueType data_type;
    327 //     typedef typename Iterator::PairReferenceType reference;
    328 //     typedef typename Iterator::PairPointerType pointer;
    329 //     typedef typename ConstIterator::PairReferenceType const_reference;
    330 //     typedef typename ConstIterator::PairPointerType const_pointer;
     322//     typedef typename Iterator::PairValue value_type;
     323//     typedef typename Iterator::Key key_type;
     324//     typedef typename Iterator::Value data_type;
     325//     typedef typename Iterator::PairReference reference;
     326//     typedef typename Iterator::PairPointer pointer;
     327//     typedef typename ConstIterator::PairReference const_reference;
     328//     typedef typename ConstIterator::PairPointer const_pointer;
    331329//     typedef int difference_type;             
    332330  };           
Note: See TracChangeset for help on using the changeset viewer.