- Added ConcreteSimulation, but not coded it`s behaviour
- Made Simulation a singleton git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@771 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
1506c46287
commit
4ab7123ced
7 changed files with 316 additions and 231 deletions
|
@ -320,7 +320,7 @@ TextSimulation::on_run(const Tokens& arguments)
|
|||
|
||||
try
|
||||
{
|
||||
run();
|
||||
Simulation::get_instance().run();
|
||||
}
|
||||
catch(UserInterruptException e)
|
||||
{
|
||||
|
@ -335,7 +335,7 @@ TextSimulation::on_pause(const Tokens& arguments)
|
|||
{
|
||||
check_arguments_num(arguments, 0);
|
||||
|
||||
pause();
|
||||
Simulation::get_instance().pause();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -343,7 +343,7 @@ TextSimulation::on_stop(const Tokens& arguments)
|
|||
{
|
||||
check_arguments_num(arguments, 0);
|
||||
|
||||
stop();
|
||||
Simulation::get_instance().stop();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -642,7 +642,7 @@ TextSimulation::on_get(const Tokens& arguments)
|
|||
if(attr == "SIMULATION_TICK")
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << "\nsimulation_tick = " << get_timer() << "ms" << endl;
|
||||
oss << "\nsimulation_tick = " << Simulation::get_instance().get_timer() << "ms" << endl;
|
||||
p_stdout(oss.str());
|
||||
}
|
||||
else
|
||||
|
@ -672,7 +672,7 @@ TextSimulation::on_set(const Tokens& arguments)
|
|||
{
|
||||
try
|
||||
{
|
||||
set_timer(string_to<int>(value));
|
||||
Simulation::get_instance().set_timer(string_to<int>(value));
|
||||
}
|
||||
catch(domain_error e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue