- Update test-python_loader, do not link to libpyloader anymore

- TODO: sigsegv (due to an hidden vtable?)


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@519 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-03-09 21:56:16 +00:00
parent 3c75e1391d
commit ef733b37e8
13 changed files with 87 additions and 24 deletions

View file

@ -73,7 +73,7 @@ Simulation::reset()
}
void
Simulation::run()
Simulation::run() throw(UserInterruptException)
{
History& h = History::get_instance();
@ -105,12 +105,22 @@ loop:
return;
}
//step forward
Scheduler::get_instance().step_forward();
try
{
//step forward
Scheduler::get_instance().step_forward();
//sleep
Glib::usleep(_timer_interval*1000);
//sleep
Glib::usleep(_timer_interval*1000);
}
catch(UserInterruptException e)
{
stop();
throw;
}
//check the state
if (_state == state_stopped || _state == state_paused)
return;
@ -136,24 +146,43 @@ loop:
//by the last execution of upadate()
_state = state_paused;
else
//step forward
Scheduler::get_instance().step_forward();
{
try
{
//step forward
Scheduler::get_instance().step_forward();
}
catch(UserInterruptException e)
{
throw;
}
}
}
}
void
Simulation::jump_to(const uint& where)
Simulation::jump_to(const uint& where) throw(UserInterruptException)
{
//jump to position 0
reset();
bool old = _mode;
_mode = false;
// executes "where" steps
for (uint i=0; i < where; i++)
run();
try
{
// executes "where" steps
for (uint i=0; i < where; i++)
run();
}
catch(UserInterruptException e)
{
_mode = old;
throw;
}
_state = state_paused;
_mode = old;