author | deba |
Fri, 12 May 2006 15:29:42 +0000 | |
changeset 2081 | 94a7deb46c07 |
parent 1860 | 27a9a75b957b |
permissions | -rw-r--r-- |
ladanyi@1860 | 1 |
#include "gui_writer.h" |
ladanyi@1860 | 2 |
#include "xml.h" |
ladanyi@1860 | 3 |
#include "mapstorage.h" |
ladanyi@1860 | 4 |
#include <lemon/xy.h> |
ladanyi@1860 | 5 |
#include <vector> |
ladanyi@1860 | 6 |
|
ladanyi@1860 | 7 |
std::string GuiWriter::header() |
ladanyi@1860 | 8 |
{ |
ladanyi@1860 | 9 |
return "@gui"; |
ladanyi@1860 | 10 |
} |
ladanyi@1860 | 11 |
|
ladanyi@1860 | 12 |
void GuiWriter::write(std::ostream& os) |
ladanyi@1860 | 13 |
{ |
ladanyi@1860 | 14 |
XmlIo x(os); |
ladanyi@1860 | 15 |
std::map<int, xy<double> > m; |
ladanyi@1860 | 16 |
for (EdgeIt e(mapstorage->graph); e != INVALID; ++e) |
ladanyi@1860 | 17 |
{ |
ladanyi@2063 | 18 |
int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e]; |
ladanyi@1860 | 19 |
m[edgeid] = mapstorage->arrow_pos[e]; |
ladanyi@1860 | 20 |
} |
ladanyi@1860 | 21 |
x("arrow_pos", m); |
ladanyi@1860 | 22 |
} |
ladanyi@1860 | 23 |
|
ladanyi@1860 | 24 |
GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms) |
ladanyi@1860 | 25 |
{ |
ladanyi@1860 | 26 |
} |