#include "gui_reader.h" #include "xml.h" #include "mapstorage.h" #include #include bool GuiReader::header(const std::string& line) { std::istringstream ls(line); std::string head; ls >> head; return head == "@gui"; } void GuiReader::read(std::istream& is) { XmlIo x(is); std::map > m; x("arrow_pos", m); if ((int)m.size() != countEdges(mapstorage->graph)) return; for (EdgeIt e(mapstorage->graph); e != INVALID; ++e) { int edgeid = (int)(*mapstorage->edgemap_storage["id"])[e]; mapstorage->arrow_pos.set(e, m[edgeid]); } mapstorage->ArrowPosReadOK(); } GuiReader::GuiReader(LemonReader& reader, MapStorage* ms) : Parent(reader), mapstorage(ms) { }