COIN-OR::LEMON - Graph Library

Changeset 163:c82fd9568d75 in lemon for lemon/lgf_reader.h


Ignore:
Timestamp:
05/31/08 12:31:21 (16 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Bug fixes and improvements in LGF IO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/lgf_reader.h

    r162 r163  
    468468        _use_nodes(other._use_nodes), _use_arcs(other._use_arcs) {
    469469
    470       other.is = 0;
     470      other._is = 0;
    471471      other.local_is = false;
    472472     
     
    10791079    /// This function starts the batch processing
    10801080    void run() {
    1081      
    10821081      LEMON_ASSERT(_is != 0, "This reader assigned to an other reader");
     1082      if (!*_is) {
     1083        throw DataFormatError("Cannot find file");
     1084      }
    10831085     
    10841086      bool nodes_done = false;
     
    11611163  template <typename Digraph>
    11621164  DigraphReader<Digraph> digraphReader(std::istream& is, Digraph& digraph) {
    1163     return DigraphReader<Digraph>(is, digraph);
     1165    DigraphReader<Digraph> tmp(is, digraph);
     1166    return tmp;
    11641167  }
    11651168
     
    11681171  DigraphReader<Digraph> digraphReader(const std::string& fn,
    11691172                                       Digraph& digraph) {
    1170     return DigraphReader<Digraph>(fn, digraph);
     1173    DigraphReader<Digraph> tmp(fn, digraph);
     1174    return tmp;
    11711175  }
    11721176
     
    11741178  template <typename Digraph>
    11751179  DigraphReader<Digraph> digraphReader(const char* fn, Digraph& digraph) {
    1176     return DigraphReader<Digraph>(fn, digraph);
     1180    DigraphReader<Digraph> tmp(fn, digraph);
     1181    return tmp;
    11771182  }
    11781183}
Note: See TracChangeset for help on using the changeset viewer.