gravatar
deba@inf.elte.hu
deba@inf.elte.hu
Bug fixes and improvements in LGF IO
0 2 0
default
2 files changed with 33 insertions and 23 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -469,3 +469,3 @@
469 469

	
470
      other.is = 0;
470
      other._is = 0;
471 471
      other.local_is = false;
... ...
@@ -1080,4 +1080,6 @@
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
      
... ...
@@ -1162,3 +1164,4 @@
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
  }
... ...
@@ -1169,3 +1172,4 @@
1169 1172
				       Digraph& digraph) {
1170
    return DigraphReader<Digraph>(fn, digraph);
1173
    DigraphReader<Digraph> tmp(fn, digraph);
1174
    return tmp;
1171 1175
  }
... ...
@@ -1175,3 +1179,4 @@
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
  }
Ignore white space 2 line context
... ...
@@ -197,3 +197,5 @@
197 197
	if (c < 0x20) {
198
	  std::ios::fmtflags flags = os.flags();
198 199
	  os << '\\' << std::oct << static_cast<int>(c);
200
	  os.flags(flags);
199 201
	} else {
... ...
@@ -245,8 +247,8 @@
245 247
  /// with the \c nodeMap() or \c arcMap() members. An optional
246
  /// converter parameter can also be added as a standard functor converting from
247
  /// the value type of the map to std::string. If it is set, it will
248
  /// determine how the map's value type is written to the output
249
  /// stream. If the functor is not set, then a default conversion
250
  /// will be used. The \c attribute(), \c node() and \c arc() functions
251
  /// are used to add attribute writing rules.
248
  /// converter parameter can also be added as a standard functor
249
  /// converting from the value type of the map to std::string. If it
250
  /// is set, it will determine how the map's value type is written to
251
  /// the output stream. If the functor is not set, then a default
252
  /// conversion will be used. The \c attribute(), \c node() and \c
253
  /// arc() functions are used to add attribute writing rules.
252 254
  ///
... ...
@@ -271,9 +273,9 @@
271 273
  /// The \c skipNodes() and \c skipArcs() functions forbid the
272
  /// writing of the sections. If two arc sections should be written to the
273
  /// output, it can be done in two passes, the first pass writes the
274
  /// node section and the first arc section, then the second pass
275
  /// skips the node section and writes just the arc section to the
276
  /// stream. The output stream can be retrieved with the \c ostream()
277
  /// function, hence the second pass can append its output to the output of the
278
  /// first pass.
274
  /// writing of the sections. If two arc sections should be written
275
  /// to the output, it can be done in two passes, the first pass
276
  /// writes the node section and the first arc section, then the
277
  /// second pass skips the node section and writes just the arc
278
  /// section to the stream. The output stream can be retrieved with
279
  /// the \c ostream() function, hence the second pass can append its
280
  /// output to the output of the first pass.
279 281
  template <typename _Digraph>
... ...
@@ -351,3 +353,3 @@
351 353

	
352
      other.is = 0;
354
      other._os = 0;
353 355
      other.local_os = false;
... ...
@@ -719,4 +721,5 @@
719 721
  template <typename Digraph>
720
  DigraphWriter<Digraph> digraphWriter(std::istream& is, Digraph& digraph) {
721
    return DigraphWriter<Digraph>(is, digraph);
722
  DigraphWriter<Digraph> digraphWriter(std::ostream& os, Digraph& digraph) {
723
    DigraphWriter<Digraph> tmp(os, digraph);
724
    return tmp;
722 725
  }
... ...
@@ -727,3 +730,4 @@
727 730
				       Digraph& digraph) {
728
    return DigraphWriter<Digraph>(fn, digraph);
731
    DigraphWriter<Digraph> tmp(fn, digraph);
732
    return tmp;
729 733
  }
... ...
@@ -733,3 +737,4 @@
733 737
  DigraphWriter<Digraph> digraphWriter(const char* fn, Digraph& digraph) {
734
    return DigraphWriter<Digraph>(fn, digraph);
738
    DigraphWriter<Digraph> tmp(fn, digraph);
739
    return tmp;
735 740
  }
0 comments (0 inline)