gravatar
deba@inf.elte.hu
deba@inf.elte.hu
Fixing constness of Graph in GraphWriter
0 1 0
default
1 file changed with 1 insertions and 1 deletions:
↑ Collapse diff ↑
Ignore white space 48 line context
... ...
@@ -913,49 +913,49 @@
913 913
  /// This utility writes an \ref lgf-format "LGF" file.
914 914
  ///
915 915
  /// It can be used almost the same way as \c DigraphWriter.
916 916
  /// The only difference is that this class can handle edges and
917 917
  /// edge maps as well as arcs and arc maps.
918 918
  ///
919 919
  /// The arc maps are written into the file as two columns, the
920 920
  /// caption of the columns are the name of the map prefixed with \c
921 921
  /// '+' and \c '-'. The arcs are written into the \c \@attributes
922 922
  /// section as a \c '+' or a \c '-' prefix (depends on the direction
923 923
  /// of the arc) and the label of corresponding edge.
924 924
  template <typename _Graph>
925 925
  class GraphWriter {
926 926
  public:
927 927

	
928 928
    typedef _Graph Graph;
929 929
    TEMPLATE_GRAPH_TYPEDEFS(Graph);
930 930

	
931 931
  private:
932 932

	
933 933

	
934 934
    std::ostream* _os;
935 935
    bool local_os;
936 936

	
937
    Graph& _graph;
937
    const Graph& _graph;
938 938

	
939 939
    std::string _nodes_caption;
940 940
    std::string _edges_caption;
941 941
    std::string _attributes_caption;
942 942

	
943 943
    typedef std::map<Node, std::string> NodeIndex;
944 944
    NodeIndex _node_index;
945 945
    typedef std::map<Edge, std::string> EdgeIndex;
946 946
    EdgeIndex _edge_index;
947 947

	
948 948
    typedef std::vector<std::pair<std::string,
949 949
      _writer_bits::MapStorageBase<Node>* > > NodeMaps;
950 950
    NodeMaps _node_maps;
951 951

	
952 952
    typedef std::vector<std::pair<std::string,
953 953
      _writer_bits::MapStorageBase<Edge>* > >EdgeMaps;
954 954
    EdgeMaps _edge_maps;
955 955

	
956 956
    typedef std::vector<std::pair<std::string,
957 957
      _writer_bits::ValueStorageBase*> > Attributes;
958 958
    Attributes _attributes;
959 959

	
960 960
    bool _skip_nodes;
961 961
    bool _skip_edges;
0 comments (0 inline)