# HG changeset patch # User marci # Date 1083058825 0 # Node ID 6d632cb56ea33a682e0a8ad3edb693ea5482eff7 # Parent 8f1dece01cc4c9c355a98e0819d18445417ac551 gcc-3.4.0 diff -r 8f1dece01cc4 -r 6d632cb56ea3 src/work/list_graph.h --- a/src/work/list_graph.h Tue Apr 27 09:26:32 2004 +0000 +++ b/src/work/list_graph.h Tue Apr 27 09:40:25 2004 +0000 @@ -368,20 +368,20 @@ /* stream operations, for testing purpose */ - friend std::ostream& operator<<(std::ostream& os, const Node& i) { - if (i.valid()) - os << i.node->id; - else - os << "invalid"; - return os; - } - friend std::ostream& operator<<(std::ostream& os, const Edge& i) { - if (i.valid()) - os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; - else - os << "invalid"; - return os; - } +// friend std::ostream& operator<<(std::ostream& os, const Node& i) { +// if (i.valid()) +// os << i.node->id; +// else +// os << "invalid"; +// return os; +// } +// friend std::ostream& operator<<(std::ostream& os, const Edge& i) { +// if (i.valid()) +// os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; +// else +// os << "invalid"; +// return os; +// } class Node { friend class ListGraph; @@ -546,6 +546,21 @@ }; }; + std::ostream& operator<<(std::ostream& os, const ListGraph::Node& i) { + if (i.valid()) + os << i.node->id; + else + os << "invalid"; + return os; + } + std::ostream& operator<<(std::ostream& os, const ListGraph::Edge& i) { + if (i.valid()) + os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; + else + os << "invalid"; + return os; + } + class UndirListGraph : public ListGraph { public: typedef SymEdgeIt OutEdgeIt;