Showed map is loaded even if ArrowPos not.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
19 #include "gui_writer.h"
21 #include "mapstorage.h"
22 #include <lemon/dim2.h>
25 std::string GuiWriter::header()
30 void GuiWriter::write(std::ostream& os)
34 for (EdgeIt e(mapstorage->graph); e != INVALID; ++e)
36 int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e];
37 m[edgeid] = mapstorage->arrow_pos[e];
41 std::map<int, std::string> nm;
42 for(int i=0;i<NODE_PROPERTY_NUM;i++)
44 nm[i]=mapstorage->active_nodemaps[i];
46 x("active_nodemaps", nm);
48 std::map<int, std::string> em;
49 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
51 em[i]=mapstorage->active_edgemaps[i];
53 x("active_edgemaps", em);
56 GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms)