COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/gui_writer.cc @ 2071:00c4ce4f4170

Last change on this file since 2071:00c4ce4f4170 was 2063:9535436aaa9f, checked in by Akos Ladanyi, 14 years ago

id->label

File size: 541 bytes
Line 
1#include "gui_writer.h"
2#include "xml.h"
3#include "mapstorage.h"
4#include <lemon/xy.h>
5#include <vector>
6
7std::string GuiWriter::header()
8{
9  return "@gui";
10}
11
12void 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["label"]))[e];
19    m[edgeid] = mapstorage->arrow_pos[e];
20  }
21  x("arrow_pos", m);
22}
23
24GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms)
25{
26}
Note: See TracBrowser for help on using the repository browser.