src/work/list_graph.h
changeset 409 7ab7f083760a
parent 389 770cc1f4861f
child 436 6d632cb56ea3
     1.1 --- a/src/work/list_graph.h	Mon Apr 26 09:21:27 2004 +0000
     1.2 +++ b/src/work/list_graph.h	Mon Apr 26 09:54:24 2004 +0000
     1.3 @@ -369,10 +369,17 @@
     1.4      /* stream operations, for testing purpose */
     1.5  
     1.6      friend std::ostream& operator<<(std::ostream& os, const Node& i) { 
     1.7 -      os << i.node->id; return os; 
     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 -      os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
    1.16 +      if (i.valid()) 
    1.17 +	os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
    1.18 +      else 
    1.19 +	os << "invalid";
    1.20        return os; 
    1.21      }
    1.22