COIN-OR::LEMON - Graph Library

Changeset 519:d3524090d5e2 in lemon


Ignore:
Timestamp:
02/20/09 21:51:11 (11 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
1.0
Parents:
512:65f80c81d41c (diff), 518:b1ef32ab39f3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge bugfixes #211, #212, #215, #229 and #230

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r504 r519  
    2323INCLUDE(FindDoxygen)
    2424INCLUDE(FindGhostscript)
     25
     26INCLUDE(CheckTypeSize)
     27CHECK_TYPE_SIZE("long long" LONG_LONG)
    2528
    2629ENABLE_TESTING()
  • CMakeLists.txt

    r515 r519  
    1111
    1212SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
     13
     14IF(MSVC)
     15  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
     16# Suppressed warnings:
     17# C4250: 'class1' : inherits 'class2::member' via dominance
     18# C4355: 'this' : used in base member initializer list
     19# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
     20# C4996: 'function': was declared deprecated
     21ENDIF(MSVC)
    1322
    1423INCLUDE(FindDoxygen)
  • lemon/lgf_reader.h

    r446 r519  
    391391  class DigraphReader;
    392392
    393   /// \brief Return a \ref DigraphReader class
    394   ///
    395   /// This function just returns a \ref DigraphReader class.
    396   /// \relates DigraphReader
    397393  template <typename Digraph>
    398   DigraphReader<Digraph> digraphReader(Digraph& digraph,
    399                                        std::istream& is = std::cin) {
    400     DigraphReader<Digraph> tmp(digraph, is);
    401     return tmp;
    402   }
    403 
    404   /// \brief Return a \ref DigraphReader class
    405   ///
    406   /// This function just returns a \ref DigraphReader class.
    407   /// \relates DigraphReader
     394  DigraphReader<Digraph> digraphReader(Digraph& digraph,
     395                                       std::istream& is = std::cin);
    408396  template <typename Digraph>
    409   DigraphReader<Digraph> digraphReader(Digraph& digraph,
    410                                        const std::string& fn) {
    411     DigraphReader<Digraph> tmp(digraph, fn);
    412     return tmp;
    413   }
    414 
    415   /// \brief Return a \ref DigraphReader class
    416   ///
    417   /// This function just returns a \ref DigraphReader class.
    418   /// \relates DigraphReader
     397  DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn);
    419398  template <typename Digraph>
    420   DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
    421     DigraphReader<Digraph> tmp(digraph, fn);
    422     return tmp;
    423   }
     399  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char *fn);
    424400
    425401  /// \ingroup lemon_io
     
    585561  private:
    586562
    587     friend DigraphReader<Digraph> digraphReader<>(Digraph& digraph,
    588                                                   std::istream& is);
    589     friend DigraphReader<Digraph> digraphReader<>(Digraph& digraph,
    590                                                   const std::string& fn);
    591     friend DigraphReader<Digraph> digraphReader<>(Digraph& digraph,
    592                                                   const char *fn);
     563    template <typename DGR>
     564    friend DigraphReader<DGR> digraphReader(DGR& digraph, std::istream& is);
     565    template <typename DGR>
     566    friend DigraphReader<DGR> digraphReader(DGR& digraph,
     567                                            const std::string& fn);
     568    template <typename DGR>
     569    friend DigraphReader<DGR> digraphReader(DGR& digraph, const char *fn);
    593570
    594571    DigraphReader(DigraphReader& other)
     
    12131190  };
    12141191
     1192  /// \brief Return a \ref DigraphReader class
     1193  ///
     1194  /// This function just returns a \ref DigraphReader class.
     1195  /// \relates DigraphReader
     1196  template <typename Digraph>
     1197  DigraphReader<Digraph> digraphReader(Digraph& digraph, std::istream& is) {
     1198    DigraphReader<Digraph> tmp(digraph, is);
     1199    return tmp;
     1200  }
     1201
     1202  /// \brief Return a \ref DigraphReader class
     1203  ///
     1204  /// This function just returns a \ref DigraphReader class.
     1205  /// \relates DigraphReader
     1206  template <typename Digraph>
     1207  DigraphReader<Digraph> digraphReader(Digraph& digraph,
     1208                                       const std::string& fn) {
     1209    DigraphReader<Digraph> tmp(digraph, fn);
     1210    return tmp;
     1211  }
     1212
     1213  /// \brief Return a \ref DigraphReader class
     1214  ///
     1215  /// This function just returns a \ref DigraphReader class.
     1216  /// \relates DigraphReader
     1217  template <typename Digraph>
     1218  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
     1219    DigraphReader<Digraph> tmp(digraph, fn);
     1220    return tmp;
     1221  }
     1222
    12151223  template <typename Graph>
    12161224  class GraphReader;
    1217 
    1218   /// \brief Return a \ref GraphReader class
    1219   ///
    1220   /// This function just returns a \ref GraphReader class.
    1221   /// \relates GraphReader
     1225 
    12221226  template <typename Graph>
    1223   GraphReader<Graph> graphReader(Graph& graph, std::istream& is = std::cin) {
    1224     GraphReader<Graph> tmp(graph, is);
    1225     return tmp;
    1226   }
    1227 
    1228   /// \brief Return a \ref GraphReader class
    1229   ///
    1230   /// This function just returns a \ref GraphReader class.
    1231   /// \relates GraphReader
     1227  GraphReader<Graph> graphReader(Graph& graph,
     1228                                 std::istream& is = std::cin);
    12321229  template <typename Graph>
    1233   GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
    1234     GraphReader<Graph> tmp(graph, fn);
    1235     return tmp;
    1236   }
    1237 
    1238   /// \brief Return a \ref GraphReader class
    1239   ///
    1240   /// This function just returns a \ref GraphReader class.
    1241   /// \relates GraphReader
     1230  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn);
    12421231  template <typename Graph>
    1243   GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
    1244     GraphReader<Graph> tmp(graph, fn);
    1245     return tmp;
    1246   }
     1232  GraphReader<Graph> graphReader(Graph& graph, const char *fn);
    12471233
    12481234  /// \ingroup lemon_io
     
    13711357
    13721358  private:
    1373     friend GraphReader<Graph> graphReader<>(Graph& graph, std::istream& is);
    1374     friend GraphReader<Graph> graphReader<>(Graph& graph,
    1375                                             const std::string& fn);
    1376     friend GraphReader<Graph> graphReader<>(Graph& graph, const char *fn);
     1359    template <typename GR>
     1360    friend GraphReader<GR> graphReader(GR& graph, std::istream& is);
     1361    template <typename GR>
     1362    friend GraphReader<GR> graphReader(GR& graph, const std::string& fn);
     1363    template <typename GR>
     1364    friend GraphReader<GR> graphReader(GR& graph, const char *fn);
    13771365
    13781366    GraphReader(GraphReader& other)
     
    20442032
    20452033  };
     2034
     2035  /// \brief Return a \ref GraphReader class
     2036  ///
     2037  /// This function just returns a \ref GraphReader class.
     2038  /// \relates GraphReader
     2039  template <typename Graph>
     2040  GraphReader<Graph> graphReader(Graph& graph, std::istream& is) {
     2041    GraphReader<Graph> tmp(graph, is);
     2042    return tmp;
     2043  }
     2044
     2045  /// \brief Return a \ref GraphReader class
     2046  ///
     2047  /// This function just returns a \ref GraphReader class.
     2048  /// \relates GraphReader
     2049  template <typename Graph>
     2050  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
     2051    GraphReader<Graph> tmp(graph, fn);
     2052    return tmp;
     2053  }
     2054
     2055  /// \brief Return a \ref GraphReader class
     2056  ///
     2057  /// This function just returns a \ref GraphReader class.
     2058  /// \relates GraphReader
     2059  template <typename Graph>
     2060  GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
     2061    GraphReader<Graph> tmp(graph, fn);
     2062    return tmp;
     2063  }
    20462064
    20472065  class SectionReader;
  • lemon/lgf_reader.h

    r517 r519  
    848848        readLine();
    849849      }
    850       line.putback(c);
     850      if (readSuccess()) {
     851        line.putback(c);
     852      }
    851853    }
    852854
     
    16881690        readLine();
    16891691      }
    1690       line.putback(c);
     1692      if (readSuccess()) {
     1693        line.putback(c);
     1694      }
    16911695    }
    16921696
     
    22452249        readLine();
    22462250      }
    2247       line.putback(c);
     2251      if (readSuccess()) {
     2252        line.putback(c);
     2253      }
    22482254    }
    22492255
     
    25862592        readLine();
    25872593      }
    2588       line.putback(c);
     2594      if (readSuccess()) {
     2595        line.putback(c);
     2596      }
    25892597    }
    25902598
Note: See TracChangeset for help on using the changeset viewer.