gcc-3.4.0
authormarci
Tue, 27 Apr 2004 09:40:25 +0000
changeset 4366d632cb56ea3
parent 435 8f1dece01cc4
child 437 9853b743d830
gcc-3.4.0
src/work/list_graph.h
     1.1 --- a/src/work/list_graph.h	Tue Apr 27 09:26:32 2004 +0000
     1.2 +++ b/src/work/list_graph.h	Tue Apr 27 09:40:25 2004 +0000
     1.3 @@ -368,20 +368,20 @@
     1.4  
     1.5      /* stream operations, for testing purpose */
     1.6  
     1.7 -    friend std::ostream& operator<<(std::ostream& os, const Node& i) { 
     1.8 -      if (i.valid())
     1.9 -	os << i.node->id; 
    1.10 -      else
    1.11 -	os << "invalid";
    1.12 -      return os; 
    1.13 -    }
    1.14 -    friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
    1.15 -      if (i.valid()) 
    1.16 -	os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
    1.17 -      else 
    1.18 -	os << "invalid";
    1.19 -      return os; 
    1.20 -    }
    1.21 +//     friend std::ostream& operator<<(std::ostream& os, const Node& i) { 
    1.22 +//       if (i.valid())
    1.23 +// 	os << i.node->id; 
    1.24 +//       else
    1.25 +// 	os << "invalid";
    1.26 +//       return os; 
    1.27 +//     }
    1.28 +//     friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
    1.29 +//       if (i.valid()) 
    1.30 +// 	os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
    1.31 +//       else 
    1.32 +// 	os << "invalid";
    1.33 +//       return os; 
    1.34 +//     }
    1.35  
    1.36      class Node {
    1.37        friend class ListGraph;
    1.38 @@ -546,6 +546,21 @@
    1.39      };
    1.40    };
    1.41  
    1.42 +  std::ostream& operator<<(std::ostream& os, const ListGraph::Node& i) { 
    1.43 +    if (i.valid())
    1.44 +      os << i.node->id; 
    1.45 +    else
    1.46 +      os << "invalid";
    1.47 +    return os; 
    1.48 +  }
    1.49 +  std::ostream& operator<<(std::ostream& os, const ListGraph::Edge& i) { 
    1.50 +    if (i.valid()) 
    1.51 +      os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
    1.52 +    else 
    1.53 +      os << "invalid";
    1.54 +    return os; 
    1.55 +  }
    1.56 +
    1.57    class UndirListGraph : public ListGraph {
    1.58    public:
    1.59      typedef SymEdgeIt OutEdgeIt;