gui_writer.cc
changeset 163 443bc769b344
parent 134 82e19031c319
child 172 fc1e478697d3
equal deleted inserted replaced
1:40a0e1455790 2:62bc0944e77d
     1 #include "gui_writer.h"
     1 #include "gui_writer.h"
     2 #include "xml.h"
     2 #include "xml.h"
     3 #include "mapstorage.h"
     3 #include "mapstorage.h"
     4 #include <lemon/xy.h>
     4 #include <lemon/dim2.h>
     5 #include <vector>
     5 #include <vector>
     6 
     6 
     7 std::string GuiWriter::header()
     7 std::string GuiWriter::header()
     8 {
     8 {
     9   return "@gui";
     9   return "@gui";
    10 }
    10 }
    11 
    11 
    12 void GuiWriter::write(std::ostream& os)
    12 void GuiWriter::write(std::ostream& os)
    13 {
    13 {
    14   XmlIo x(os);
    14   XmlIo x(os);
    15   std::map<int, xy<double> > m;
    15   std::map<int, XY > m;
    16   for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
    16   for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
    17   {
    17   {
    18     int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e];
    18     int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e];
    19     m[edgeid] = mapstorage->arrow_pos[e];
    19     m[edgeid] = mapstorage->arrow_pos[e];
    20   }
    20   }