/* -*- C++ -*- * * This file is a part of LEMON, a generic C++ optimization library * * Copyright (C) 2003-2006 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ #include #include #include #include #include std::string GuiWriter::header() { return "@gui"; } void GuiWriter::write(std::ostream& os) { XmlIo x(os); std::map m; for (EdgeIt e(mapstorage->graph); e != INVALID; ++e) { int edgeid = (int)(*(mapstorage->edgemap_storage["label"]))[e]; m[edgeid] = mapstorage->arrow_pos[e]; } x("arrow_pos", m); std::map nm; for(int i=0;iactive_nodemaps[i]; } x("active_nodemaps", nm); std::map em; for(int i=0;iactive_edgemaps[i]; } x("active_edgemaps", em); double attraction; double propulsation; int iteration; mapstorage->get_design_data(attraction, propulsation, iteration); x("redesign-attraction", attraction); x("redesign-propulsation", propulsation); x("redesign-iteration", iteration); } GuiWriter::GuiWriter(LemonWriter& writer, MapStorage* ms) : Parent(writer), mapstorage(ms) { }