COIN-OR::LEMON - Graph Library

Changeset 2121:09a07a851506 in lemon-0.x for lemon/concept/ugraph.h


Ignore:
Timestamp:
07/10/06 21:04:17 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2834
Message:

Modifications in the Graph Component concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concept/ugraph.h

    r2120 r2121  
    490490      /// \warning Making maps that can handle bool type (NodeMap<bool>)
    491491      /// needs some extra attention!
    492       /// \todo Wrong documentation
    493492      template<class T>
    494493      class NodeMap : public ReadWriteMap< Node, T >
     
    504503        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
    505504        ///Assignment operator
    506         NodeMap& operator=(const NodeMap&) { return *this; }
    507         // \todo fix this concept
     505        template <typename CMap>
     506        NodeMap& operator=(const CMap&) {
     507          checkConcept<ReadMap<Node, T>, CMap>();
     508          return *this;
     509        }
    508510      };
    509511
     
    514516      /// \warning Making maps that can handle bool type (EdgeMap<bool>)
    515517      /// needs some extra attention!
    516       /// \todo Wrong documentation
    517518      template<class T>
    518519      class EdgeMap : public ReadWriteMap<Edge,T>
     
    527528        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
    528529        ///Assignment operator
    529         EdgeMap& operator=(const EdgeMap&) { return *this; }
    530         // \todo fix this concept   
     530        template <typename CMap>
     531        EdgeMap& operator=(const CMap&) {
     532          checkConcept<ReadMap<Edge, T>, CMap>();
     533          return *this;
     534        }
    531535      };
    532536
     
    537541      /// \warning Making maps that can handle bool type (UEdgeMap<bool>)
    538542      /// needs some extra attention!
    539       /// \todo Wrong documentation
    540543      template<class T>
    541544      class UEdgeMap : public ReadWriteMap<UEdge,T>
     
    550553        UEdgeMap(const UEdgeMap& em) : ReadWriteMap<UEdge,T>(em) {}
    551554        ///Assignment operator
    552         UEdgeMap &operator=(const UEdgeMap&) { return *this; }
    553         // \todo fix this concept   
     555        template <typename CMap>
     556        UEdgeMap& operator=(const CMap&) {
     557          checkConcept<ReadMap<UEdge, T>, CMap>();
     558          return *this;
     559        }
    554560      };
    555561
     
    673679      struct Constraints {
    674680        void constraints() {
    675           checkConcept<BaseIterableUGraphConcept, Graph>();
    676           checkConcept<IterableUGraphConcept, Graph>();
    677           checkConcept<MappableUGraphConcept, Graph>();
     681          checkConcept<BaseIterableUGraphComponent<>, Graph>();
     682          checkConcept<IterableUGraphComponent<>, Graph>();
     683          checkConcept<MappableUGraphComponent<>, Graph>();
    678684        }
    679685      };
Note: See TracChangeset for help on using the changeset viewer.