- Add naive code to test Simulation from the GUI. Please note that

we need to move the "continous/non-continous" code snippet out of ConcreteSimulation
and into TextualSimulation/the GUI Simulation. In fact, ConcreteSimulation
is just a state machine that performs a single step and then puts itself
either in paused state (if the Simulation hasn't finished) or into stopped state
(if it finished)


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@945 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-27 13:39:40 +00:00
parent aa608a1cc2
commit 1087d45628
4 changed files with 450 additions and 645 deletions

View file

@ -18,6 +18,8 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "gettext.h"
#include "schedulables_tree_widget.hh"
#include "backend/history.hh"
#include "backend/simulation.hh"
@ -239,6 +241,8 @@ SchedulablesTreeWidget::on_button_press_event(GdkEventButton* event)
break;
case htype_subrequest:
removes = "<menuitem action='RemoveSubrequest'/>";
default:
break;
}
adds += "<menuitem action='AddProcess'/>";
@ -265,8 +269,7 @@ SchedulablesTreeWidget::on_button_press_event(GdkEventButton* event)
void
SchedulablesTreeWidget::_update_expanded_vector(Gtk::TreeView* treeview,
const Gtk::TreeModel::Path& path)
SchedulablesTreeWidget::_update_expanded_vector(Gtk::TreeView*, const Gtk::TreeModel::Path& path)
{
_expanded_rows.push_back(path.to_string());
}
@ -347,12 +350,11 @@ SchedulablesTreeWidget::update(const History& history)
}
// Restore expanded rows
for(vector<Glib::ustring>::iterator it = _expanded_rows.begin(); it != _expanded_rows.end(); ++it)
for(Iseq<vector<Glib::ustring>::const_iterator> it = const_iseq(_expanded_rows); it; ++it)
expand_row(Gtk::TreeModel::Path(*it), false);
// We can clear it now, since until next update we won't need it.
_expanded_rows.clear();
}
void