Changeset 1311:b810a07248a0 in lemon-0.x for src/lemon/graph_reader.h
- Timestamp:
- 04/06/05 19:19:54 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1750
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/graph_reader.h
r1287 r1311 83 83 char c; 84 84 value.clear(); 85 is >> ws;85 is >> std::ws; 86 86 if (!is.get(c) || c != '\"') 87 87 throw DataFormatError("Quoted string format error"); … … 358 358 359 359 std::string readNodeSet(int& line_num, 360 auto_ptr<InverterBase<Node> >& nodeInverter) {360 std::auto_ptr<InverterBase<Node> >& nodeInverter) { 361 361 std::vector<ReaderBase<Node>* > index; 362 362 { … … 380 380 } 381 381 382 nodeInverter = auto_ptr<InverterBase<Node> >(index[0]->getInverter()); 382 nodeInverter = 383 std::auto_ptr<InverterBase<Node> >(index[0]->getInverter()); 383 384 std::string line; 384 385 while (line = readNotEmptyLine(is, line_num), line[0] != '@') { … … 394 395 395 396 std::string readEdgeSet(int& line_num, 396 auto_ptr<InverterBase<Edge> >& edgeInverter,397 auto_ptr<InverterBase<Node> >& nodeInverter) {397 std::auto_ptr<InverterBase<Edge> >& edgeInverter, 398 std::auto_ptr<InverterBase<Node> >& nodeInverter) { 398 399 std::vector<ReaderBase<Edge>*> index; 399 400 { … … 417 418 } 418 419 419 edgeInverter = auto_ptr<InverterBase<Edge> >(index[0]->getInverter()); 420 edgeInverter = 421 std::auto_ptr<InverterBase<Edge> >(index[0]->getInverter()); 420 422 std::string line; 421 423 while (line = readNotEmptyLine(is, line_num), line[0] != '@') { … … 433 435 434 436 std::string readNodes(int& line_num, 435 auto_ptr<InverterBase<Node> >& nodeInverter) {437 std::auto_ptr<InverterBase<Node> >& nodeInverter) { 436 438 std::string line; 437 439 while (line = readNotEmptyLine(is, line_num), line[0] != '@') { … … 448 450 449 451 std::string readEdges(int& line_num, 450 auto_ptr<InverterBase<Edge> >& edgeInverter) {452 std::auto_ptr<InverterBase<Edge> >& edgeInverter) { 451 453 std::string line; 452 454 while (line = readNotEmptyLine(is, line_num), line[0] != '@') { … … 466 468 while (++line_num, getline(is, line)) { 467 469 int vi = line.find_first_not_of(" \t"); 468 if (vi != (int)st ring::npos && line[vi] != '#') {470 if (vi != (int)std::string::npos && line[vi] != '#') { 469 471 return line.substr(vi); 470 472 } … … 508 510 typename Inverse::iterator it = inverse.find(value); 509 511 if (it == inverse.end()) { 510 inverse.insert( make_pair(value, item));512 inverse.insert(std::make_pair(value, item)); 511 513 } else { 512 514 throw DataFormatError("Multiple ID occurence"); … … 546 548 typename Inverse::iterator it = inverse.find(value); 547 549 if (it == inverse.end()) { 548 inverse.insert( make_pair(value, item));550 inverse.insert(std::make_pair(value, item)); 549 551 } else { 550 552 throw DataFormatError("Multiple ID occurence error");
Note: See TracChangeset
for help on using the changeset viewer.