Removing obsolote "id" map handling
authordeba
Tue, 07 Mar 2006 11:06:57 +0000
changeset 2001c9e5de6e3eac
parent 2000 ebcc93ead7da
child 2002 9ff31b5090bd
Removing obsolote "id" map handling
Error message is modified
lemon/lemon_reader.h
     1.1 --- a/lemon/lemon_reader.h	Mon Mar 06 17:32:35 2006 +0000
     1.2 +++ b/lemon/lemon_reader.h	Tue Mar 07 11:06:57 2006 +0000
     1.3 @@ -895,7 +895,7 @@
     1.4  	} else {
     1.5  	  index.push_back(&skipper);
     1.6  	}
     1.7 -	if (id == "label" || (id =="id" && inverter.get() == 0)) {
     1.8 +	if (id == "label") {
     1.9  	  inverter.reset(index.back()->getInverter());
    1.10  	  index.back() = inverter.get();
    1.11  	}
    1.12 @@ -920,7 +920,7 @@
    1.13      virtual void missing() {
    1.14        if (readers.empty()) return;
    1.15        ErrorMessage msg;
    1.16 -      msg << "NodeSet section not found in file: " << name;
    1.17 +      msg << "NodeSet section not found in file: @nodeset " << name;
    1.18        throw IOParameterError(msg.message());
    1.19      }
    1.20  
    1.21 @@ -1128,7 +1128,7 @@
    1.22  	} else {
    1.23  	  index.push_back(&skipper);
    1.24  	}
    1.25 -	if (id == "label" || (id =="id" && inverter.get() == 0)) {
    1.26 +	if (id == "label") {
    1.27  	  inverter.reset(index.back()->getInverter());
    1.28  	  index.back() = inverter.get();
    1.29  	}
    1.30 @@ -1155,7 +1155,7 @@
    1.31      virtual void missing() {
    1.32        if (readers.empty()) return;
    1.33        ErrorMessage msg;
    1.34 -      msg << "EdgeSet section not found in file: " << name;
    1.35 +      msg << "EdgeSet section not found in file: @edgeset " << name;
    1.36        throw IOParameterError(msg.message());
    1.37      }
    1.38  
    1.39 @@ -1179,7 +1179,9 @@
    1.40  
    1.41    private:
    1.42  
    1.43 -    typedef std::map<std::string, _reader_bits::MapReaderBase<Edge>*> MapReaders;
    1.44 +    typedef std::map<std::string, _reader_bits::MapReaderBase<Edge>*> 
    1.45 +    MapReaders;
    1.46 +    
    1.47      MapReaders readers;
    1.48     
    1.49      Graph& graph;   
    1.50 @@ -1213,8 +1215,8 @@
    1.51    /// give back that uicted edge which is mapped to this value.
    1.52    ///
    1.53    /// The undirected edgeset reader needs a node id reader to identify which 
    1.54 -  /// nodes have to be connected. If a NodeSetReader reads an "label" named map,
    1.55 -  /// it will be able to resolve the nodes by ids.
    1.56 +  /// nodes have to be connected. If a NodeSetReader reads an "label" named 
    1.57 +  /// map, it will be able to resolve the nodes by ids.
    1.58    ///
    1.59    /// \relates LemonReader
    1.60    template <typename _Graph, typename _Traits = DefaultReaderTraits>
    1.61 @@ -1431,7 +1433,7 @@
    1.62  	} else {
    1.63  	  index.push_back(&skipper);
    1.64  	}
    1.65 -	if (id == "label" || (id =="id" && inverter.get() == 0)) {
    1.66 +	if (id == "label") {
    1.67  	  inverter.reset(index.back()->getInverter());
    1.68  	  index.back() = inverter.get();
    1.69  	}
    1.70 @@ -1458,7 +1460,7 @@
    1.71      virtual void missing() {
    1.72        if (readers.empty()) return;
    1.73        ErrorMessage msg;
    1.74 -      msg << "UEdgeSet section not found in file: " << name;
    1.75 +      msg << "UEdgeSet section not found in file: @uedgeset " << name;
    1.76        throw IOParameterError(msg.message());
    1.77      }
    1.78  
    1.79 @@ -1615,7 +1617,7 @@
    1.80      virtual void missing() {
    1.81        if (readers.empty()) return;
    1.82        ErrorMessage msg;
    1.83 -      msg << "Nodes section not found in file: " << name;
    1.84 +      msg << "Nodes section not found in file: @nodes " << name;
    1.85        throw IOParameterError(msg.message());
    1.86      }
    1.87      
    1.88 @@ -1728,7 +1730,7 @@
    1.89      virtual void missing() {
    1.90        if (readers.empty()) return;
    1.91        ErrorMessage msg;
    1.92 -      msg << "Edges section not found in file: " << name;
    1.93 +      msg << "Edges section not found in file: @edges " << name;
    1.94        throw IOParameterError(msg.message());
    1.95      }
    1.96      
    1.97 @@ -1880,7 +1882,7 @@
    1.98      virtual void missing() {
    1.99        if (edgeReaders.empty() && uEdgeReaders.empty()) return;
   1.100        ErrorMessage msg;
   1.101 -      msg << "UEdges section not found in file: " << name;
   1.102 +      msg << "UEdges section not found in file: @uedges " << name;
   1.103        throw IOParameterError(msg.message());
   1.104      }
   1.105      
   1.106 @@ -2007,7 +2009,7 @@
   1.107      virtual void missing() {
   1.108        if (readers.empty()) return;
   1.109        ErrorMessage msg;
   1.110 -      msg << "Attribute section not found in file: " << name;
   1.111 +      msg << "Attribute section not found in file: @attributes " << name;
   1.112        throw IOParameterError(msg.message());
   1.113      }
   1.114