gui/gui_writer.cc
author deba
Wed, 22 Feb 2006 18:26:56 +0000
changeset 1979 c2992fd74dad
child 2063 9535436aaa9f
permissions -rw-r--r--
Mergeing extendermerge branch
Changes:
the extender system
resize for static size graph
UGraphExtender => UndirectGraphExtender
UGraphExtenders with changed meaning
Some UGraphExtender /SubUGraphExtenders, DirectUGraphExtender/
GridGraph => GridUGraph
radix sort to ansi compatible
     1 #include "gui_writer.h"
     2 #include "xml.h"
     3 #include "mapstorage.h"
     4 #include <lemon/xy.h>
     5 #include <vector>
     6 
     7 std::string GuiWriter::header()
     8 {
     9   return "@gui";
    10 }
    11 
    12 void GuiWriter::write(std::ostream& os)
    13 {
    14   XmlIo x(os);
    15   std::map<int, xy<double> > m;
    16   for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
    17   {
    18     int edgeid = (int)(*(mapstorage->edgemap_storage["id"]))[e];
    19     m[edgeid] = mapstorage->arrow_pos[e];
    20   }
    21   x("arrow_pos", m);
    22 }
    23 
    24 GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms)
    25 {
    26 }