author | hegyi |
Mon, 02 Oct 2006 18:52:00 +0000 | |
changeset 157 | 7e6ad28aeb9e |
parent 134 | 82e19031c319 |
child 172 | fc1e478697d3 |
permissions | -rw-r--r-- |
ladanyi@98 | 1 |
#include "gui_writer.h" |
ladanyi@98 | 2 |
#include "xml.h" |
ladanyi@98 | 3 |
#include "mapstorage.h" |
hegyi@150 | 4 |
#include <lemon/dim2.h> |
ladanyi@98 | 5 |
#include <vector> |
ladanyi@98 | 6 |
|
ladanyi@98 | 7 |
std::string GuiWriter::header() |
ladanyi@98 | 8 |
{ |
ladanyi@98 | 9 |
return "@gui"; |
ladanyi@98 | 10 |
} |
ladanyi@98 | 11 |
|
ladanyi@98 | 12 |
void GuiWriter::write(std::ostream& os) |
ladanyi@98 | 13 |
{ |
ladanyi@98 | 14 |
XmlIo x(os); |
hegyi@150 | 15 |
std::map<int, XY > m; |
ladanyi@98 | 16 |
for (EdgeIt e(mapstorage->graph); e != INVALID; ++e) |
ladanyi@98 | 17 |
{ |
ladanyi@134 | 18 |
int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e]; |
ladanyi@98 | 19 |
m[edgeid] = mapstorage->arrow_pos[e]; |
ladanyi@98 | 20 |
} |
ladanyi@98 | 21 |
x("arrow_pos", m); |
ladanyi@98 | 22 |
} |
ladanyi@98 | 23 |
|
ladanyi@98 | 24 |
GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms) |
ladanyi@98 | 25 |
{ |
ladanyi@98 | 26 |
} |