Changeset 163:c82fd9568d75 in lemon-1.2 for lemon/lgf_reader.h
- Timestamp:
- 05/31/08 12:31:21 (17 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lgf_reader.h
r162 r163 468 468 _use_nodes(other._use_nodes), _use_arcs(other._use_arcs) { 469 469 470 other. is = 0;470 other._is = 0; 471 471 other.local_is = false; 472 472 … … 1079 1079 /// This function starts the batch processing 1080 1080 void run() { 1081 1082 1081 LEMON_ASSERT(_is != 0, "This reader assigned to an other reader"); 1082 if (!*_is) { 1083 throw DataFormatError("Cannot find file"); 1084 } 1083 1085 1084 1086 bool nodes_done = false; … … 1161 1163 template <typename Digraph> 1162 1164 DigraphReader<Digraph> digraphReader(std::istream& is, Digraph& digraph) { 1163 return DigraphReader<Digraph>(is, digraph); 1165 DigraphReader<Digraph> tmp(is, digraph); 1166 return tmp; 1164 1167 } 1165 1168 … … 1168 1171 DigraphReader<Digraph> digraphReader(const std::string& fn, 1169 1172 Digraph& digraph) { 1170 return DigraphReader<Digraph>(fn, digraph); 1173 DigraphReader<Digraph> tmp(fn, digraph); 1174 return tmp; 1171 1175 } 1172 1176 … … 1174 1178 template <typename Digraph> 1175 1179 DigraphReader<Digraph> digraphReader(const char* fn, Digraph& digraph) { 1176 return DigraphReader<Digraph>(fn, digraph); 1180 DigraphReader<Digraph> tmp(fn, digraph); 1181 return tmp; 1177 1182 } 1178 1183 }
Note: See TracChangeset
for help on using the changeset viewer.