lemon/lgf_reader.h
changeset 559 c5fd2d996909
parent 517 2b6d5d22bb23
child 584 33c6b6e755cd
child 598 a3402913cffe
     1.1 --- a/lemon/lgf_reader.h	Thu Mar 05 10:13:20 2009 +0000
     1.2 +++ b/lemon/lgf_reader.h	Sun Mar 29 23:08:20 2009 +0200
     1.3 @@ -448,16 +448,16 @@
     1.4    /// It is impossible to read this in
     1.5    /// a single pass, because the arcs are not constructed when the node
     1.6    /// maps are read.
     1.7 -  template <typename _Digraph>
     1.8 +  template <typename GR>
     1.9    class DigraphReader {
    1.10    public:
    1.11  
    1.12 -    typedef _Digraph Digraph;
    1.13 +    typedef GR Digraph;
    1.14 +
    1.15 +  private:
    1.16 +
    1.17      TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
    1.18  
    1.19 -  private:
    1.20 -
    1.21 -
    1.22      std::istream* _is;
    1.23      bool local_is;
    1.24      std::string _filename;
    1.25 @@ -1246,15 +1246,16 @@
    1.26    /// prefixed with \c '+' and \c '-', then these can be read into an
    1.27    /// arc map.  Similarly, an attribute can be read into an arc, if
    1.28    /// it's value is an edge label prefixed with \c '+' or \c '-'.
    1.29 -  template <typename _Graph>
    1.30 +  template <typename GR>
    1.31    class GraphReader {
    1.32    public:
    1.33  
    1.34 -    typedef _Graph Graph;
    1.35 +    typedef GR Graph;
    1.36 +
    1.37 +  private:
    1.38 +
    1.39      TEMPLATE_GRAPH_TYPEDEFS(Graph);
    1.40  
    1.41 -  private:
    1.42 -
    1.43      std::istream* _is;
    1.44      bool local_is;
    1.45      std::string _filename;
    1.46 @@ -1356,12 +1357,12 @@
    1.47      }
    1.48  
    1.49    private:
    1.50 -    template <typename GR>
    1.51 -    friend GraphReader<GR> graphReader(GR& graph, std::istream& is);
    1.52 -    template <typename GR>
    1.53 -    friend GraphReader<GR> graphReader(GR& graph, const std::string& fn); 
    1.54 -    template <typename GR>
    1.55 -    friend GraphReader<GR> graphReader(GR& graph, const char *fn);
    1.56 +    template <typename Graph>
    1.57 +    friend GraphReader<Graph> graphReader(Graph& graph, std::istream& is);
    1.58 +    template <typename Graph>
    1.59 +    friend GraphReader<Graph> graphReader(Graph& graph, const std::string& fn); 
    1.60 +    template <typename Graph>
    1.61 +    friend GraphReader<Graph> graphReader(Graph& graph, const char *fn);
    1.62  
    1.63      GraphReader(GraphReader& other)
    1.64        : _is(other._is), local_is(other.local_is), _graph(other._graph),