- Fixed linking problem with visibility enabled caused by TextSimulation accessing (stupidly) Dynamic* objects

- Removed a bunch of FIXME from text_simulation.cc, now TextSimulation fully cooperates with Environment and History

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@774 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-07-16 21:43:54 +00:00
parent a092f3dc7b
commit f4b255d31c
5 changed files with 140 additions and 127 deletions

View file

@ -169,7 +169,17 @@ ConcreteSimulation::run() throw(UserInterruptException)
}
Simulation::state
ConcreteSimulation::get_state() const
{
return _state;
}
ConcreteHistory&
ConcreteSimulation::get_history()
{
return _history;
}
void
ConcreteSimulation::set_policy(Policy* p)

View file

@ -47,8 +47,12 @@ namespace sgpem
bool get_mode() const;
state get_state() const;
void set_policy(Policy*);
ConcreteHistory& get_history();
Policy* get_policy();
private:

View file

@ -25,6 +25,7 @@ namespace sgpem
{
class ConcreteSimulation;
class Policy;
class History;
}
#include "config.h"
@ -125,10 +126,10 @@ namespace sgpem
*/
virtual bool get_mode() const = 0;
virtual state get_state() const = 0;
/**
\brief Setup the policy to be used by the system.
The input pointer must be one of those returned by get_avaiable_policies().
*/
virtual void set_policy(Policy*) = 0;
@ -137,6 +138,8 @@ namespace sgpem
*/
virtual Policy* get_policy() = 0;
virtual History& get_history() = 0;
/**
* Small kludge to avoid the need for declaration of ConcreteSimulation
* by the calling code of Simulation::get_instance()