gui/gui_writer.cc
changeset 1860 27a9a75b957b
child 2063 9535436aaa9f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gui/gui_writer.cc	Sat Dec 17 20:55:41 2005 +0000
     1.3 @@ -0,0 +1,26 @@
     1.4 +#include "gui_writer.h"
     1.5 +#include "xml.h"
     1.6 +#include "mapstorage.h"
     1.7 +#include <lemon/xy.h>
     1.8 +#include <vector>
     1.9 +
    1.10 +std::string GuiWriter::header()
    1.11 +{
    1.12 +  return "@gui";
    1.13 +}
    1.14 +
    1.15 +void GuiWriter::write(std::ostream& os)
    1.16 +{
    1.17 +  XmlIo x(os);
    1.18 +  std::map<int, xy<double> > m;
    1.19 +  for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
    1.20 +  {
    1.21 +    int edgeid = (int)(*(mapstorage->edgemap_storage["id"]))[e];
    1.22 +    m[edgeid] = mapstorage->arrow_pos[e];
    1.23 +  }
    1.24 +  x("arrow_pos", m);
    1.25 +}
    1.26 +
    1.27 +GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms)
    1.28 +{
    1.29 +}