gui_reader.cc
changeset 157 7e6ad28aeb9e
parent 134 82e19031c319
child 172 fc1e478697d3
equal deleted inserted replaced
1:d0c511a5e24b 2:73ea4983e45e
     1 #include "gui_reader.h"
     1 #include "gui_reader.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 bool GuiReader::header(const std::string& line)
     7 bool GuiReader::header(const std::string& line)
     8 {
     8 {
     9   std::istringstream ls(line);
     9   std::istringstream ls(line);
    13 }
    13 }
    14 
    14 
    15 void GuiReader::read(std::istream& is)
    15 void GuiReader::read(std::istream& is)
    16 {
    16 {
    17   XmlIo x(is);
    17   XmlIo x(is);
    18   std::map<int, xy<double> > m;
    18   std::map<int, XY > m;
    19   x("arrow_pos", m);
    19   x("arrow_pos", m);
    20 
    20 
    21   if ((int)m.size() != countEdges(mapstorage->graph)) return;
    21   if ((int)m.size() != countEdges(mapstorage->graph)) return;
    22 
    22 
    23   for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
    23   for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)