# HG changeset patch # User deba # Date 1121699035 0 # Node ID 0853ed07a6779999a70c05b525ee8a51686f11c5 # Parent 73c3f5d0079c45498edad75b79f395875a900a4d Fix concepts and constraints diff -r 73c3f5d0079c -r 0853ed07a677 lemon/concept/graph.h --- a/lemon/concept/graph.h Fri Jul 15 21:17:18 2005 +0000 +++ b/lemon/concept/graph.h Mon Jul 18 15:03:55 2005 +0000 @@ -406,6 +406,75 @@ ///Gives back the source node of an edge. /// Node source(Edge) const { return INVALID; } + + /// Gives back the first Node in the iterating order. + + /// Gives back the first Node in the iterating order. + /// + void first(Node&) const {} + + /// Gives back the next Node in the iterating order. + + /// Gives back the next Node in the iterating order. + /// + void next(Node&) const {} + + /// Gives back the first Edge in the iterating order. + + /// Gives back the first Edge in the iterating order. + /// + void first(Edge&) const {} + /// Gives back the next Edge in the iterating order. + + /// Gives back the next Edge in the iterating order. + /// + void next(Edge&) const {} + + + /// Gives back the first of the Edges point to the given Node. + + /// Gives back the first of the Edges point to the given Node. + /// + void firstIn(Edge&, const Node&) const {} + + /// Gives back the next of the Edges points to the given Node. + + + /// Gives back the next of the Edges points to the given Node. + /// + void nextIn(Edge&) const {} + + /// Gives back the first of the Edges start from the given Node. + + /// Gives back the first of the Edges start from the given Node. + /// + void firstOut(Edge&, const Node&) const {} + + /// Gives back the next of the Edges start from the given Node. + + /// Gives back the next of the Edges start from the given Node. + /// + void nextOut(Edge&) const {} + + /// \brief The base node of the iterator. + /// + /// Gives back the base node of the iterator. + Node baseNode(const InEdgeIt&) const { return INVALID; } + + /// \brief The running node of the iterator. + /// + /// Gives back the running node of the iterator. + Node runningNode(const InEdgeIt&) const { return INVALID; } + + /// \brief The base node of the iterator. + /// + /// Gives back the base node of the iterator. + Node baseNode(const OutEdgeIt&) const { return INVALID; } + + /// \brief The running node of the iterator. + /// + /// Gives back the running node of the iterator. + Node runningNode(const OutEdgeIt&) const { return INVALID; } /// Read write map of the nodes to type \c T. /// \ingroup concept diff -r 73c3f5d0079c -r 0853ed07a677 lemon/concept/graph_component.h --- a/lemon/concept/graph_component.h Fri Jul 15 21:17:18 2005 +0000 +++ b/lemon/concept/graph_component.h Mon Jul 18 15:03:55 2005 +0000 @@ -677,20 +677,41 @@ /// This iterator goes trough the \e outgoing edges of a certain node /// of a graph. typedef GraphIncIterator OutEdgeIt; - }; + + /// \brief The base node of the iterator. + /// + /// Gives back the base node of the iterator. + Node baseNode(const InEdgeIt&) const { return INVALID; } + + /// \brief The running node of the iterator. + /// + /// Gives back the running node of the iterator. + Node runningNode(const InEdgeIt&) const { return INVALID; } + + /// \brief The base node of the iterator. + /// + /// Gives back the base node of the iterator. + Node baseNode(const OutEdgeIt&) const { return INVALID; } + + /// \brief The running node of the iterator. + /// + /// Gives back the running node of the iterator. + Node runningNode(const OutEdgeIt&) const { return INVALID; } + - template - struct Constraints { - void constraints() { - checkConcept< BaseGraphComponent, _Graph>(); - - checkConcept, - typename _Graph::EdgeIt >(); - checkConcept, - typename _Graph::NodeIt >(); - checkConcept, typename _Graph::InEdgeIt >(); - checkConcept, typename _Graph::OutEdgeIt >(); - } + template + struct Constraints { + void constraints() { + checkConcept< BaseGraphComponent, _Graph>(); + + checkConcept, + typename _Graph::EdgeIt >(); + checkConcept, + typename _Graph::NodeIt >(); + checkConcept, typename _Graph::InEdgeIt>(); + checkConcept, typename _Graph::OutEdgeIt>(); + } + }; }; /// An empty alteration notifier base graph class.