diff -r 075aaa0a4e6f -r 27a9a75b957b gui/gui_reader.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gui/gui_reader.cc Sat Dec 17 20:55:41 2005 +0000 @@ -0,0 +1,33 @@ +#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) +{ +}