gui_writer.cc
author hegyi
Thu, 12 Oct 2006 11:39:29 +0000
changeset 160 14a76109b561
parent 134 82e19031c319
child 172 fc1e478697d3
permissions -rw-r--r--
Node antigravity and edge elasticity based graph layout redesigner.
     1 #include "gui_writer.h"
     2 #include "xml.h"
     3 #include "mapstorage.h"
     4 #include <lemon/dim2.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 > m;
    16   for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
    17   {
    18     int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[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 }