src/lemon/concept/undir_graph.h
changeset 989 ca95f8b5c931
parent 986 e997802b855c
child 1021 fd1d073b6557
equal deleted inserted replaced
1:8725f8af6aea 2:5cb064af411b
    36     template <typename Graph>
    36     template <typename Graph>
    37     struct BaseIterableUndirGraphConcept {
    37     struct BaseIterableUndirGraphConcept {
    38       typedef typename Graph::UndirEdge UndirEdge;
    38       typedef typename Graph::UndirEdge UndirEdge;
    39       typedef typename Graph::Edge Edge;
    39       typedef typename Graph::Edge Edge;
    40       typedef typename Graph::Node Node;
    40       typedef typename Graph::Node Node;
       
    41 
    41       void constraints() {
    42       void constraints() {
    42 	function_requires< BaseIterableGraphComponentConcept<Graph> >();
    43 	checkConcept<BaseIterableGraphComponent, Graph>();
    43 	function_requires< GraphItemConcept<UndirEdge> >();
    44 	checkConcept<GraphItem<'u'>, UndirEdge >();
    44 
    45 
    45 	/// \bug this should be base_and_derived:
    46 	/// \bug this should be base_and_derived:
    46 	UndirEdge ue = e;
    47 	UndirEdge ue = e;
    47 	ue = e;
    48 	ue = e;
    48 
    49 
    58     };
    59     };
    59 
    60 
    60     template <typename Graph>
    61     template <typename Graph>
    61     struct IterableUndirGraphConcept {
    62     struct IterableUndirGraphConcept {
    62       void constraints() {
    63       void constraints() {
    63 	function_requires< BaseIterableUndirGraphConcept<Graph> > ();
    64 	/// \todo we don't need the iterable component should base iterable	
    64 	function_requires< IterableGraphComponentConcept<Graph> > ();
    65 	//	checkConcept< BaseIterableUndirGraph, Graph > ();
       
    66 	checkConcept< IterableGraphComponent, Graph > ();
    65 
    67 
    66 	typedef typename Graph::UndirEdge UndirEdge;
    68 	typedef typename Graph::UndirEdge UndirEdge;
    67 	typedef typename Graph::UndirEdgeIt UndirEdgeIt;
    69 	typedef typename Graph::UndirEdgeIt UndirEdgeIt;
    68 
    70 
    69 	function_requires<
    71 	checkConcept< GraphIterator<Graph, UndirEdge>, UndirEdgeIt >();
    70 	  GraphIteratorConcept<UndirEdgeIt, Graph, UndirEdge> >();
       
    71       }
    72       }
    72     };
    73     };
    73 
    74 
    74   }
    75   }
    75 
    76