- Mega-update. Take it while it's hot... but my brain's frying!

- Fixed all Dynamic and Static entities lacking proper destructors:
Dynamic entities need to delete Dynamic children, Static entities
need only to delete them from the list of their siblings
- Added methods to get Static "core" from Dynamic*.
- Now get_core() is a pure virtual function into DynamicSchedulable.
A quite nice solution(?), really, if I can say that myself... ;-)
- ConcreteHistory is half-implemented. It's the other half that 
worries me.
- TODO: finish off ConcreteHistory, and check that things get destroyed
properly (no leaks allowed, use valgrind).
- TODO: rework Simulation
- TODO: Scheduler rewrite
- *A side note*: this code is becoming a mess. I prefer references over
pointers, but someone other prefer pointers over references, and what
happens is that you've to continously pass from one to another when
invoking other methods... this is bad.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@694 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-07-02 22:20:03 +00:00
parent 787d24964b
commit 7d62f4b937
25 changed files with 564 additions and 321 deletions

View file

@ -58,6 +58,7 @@ namespace sgpem
public:
typedef unsigned int size_t;
typedef unsigned int time_t;
typedef unsigned int position;
typedef int prio_t;
typedef Environment::resource_key_t resource_key_t;
@ -66,10 +67,10 @@ namespace sgpem
virtual ~History() = 0;
virtual size_t get_size() = 0;
virtual const Environment& get_last_environment() const = 0;
virtual const Environment& get_last_environment(position index) const = 0;
virtual const Environment& get_environment_at() const throw(std::out_of_range) = 0;
virtual void remove(const Resource& resource) = 0;
virtual void remove(resource_key_t resource_key) = 0;
virtual void remove(const Process& process) = 0;
virtual void remove(const Thread& thread) = 0;
virtual void remove(const Request& request) = 0;
@ -87,6 +88,7 @@ namespace sgpem
virtual Thread& add_thread(const Glib::ustring& name,
Process& parent,
time_t cpu_time,
time_t arrival_time = 0,
prio_t base_priority = 0) = 0;
@ -106,7 +108,7 @@ namespace sgpem
typedef std::vector<HistoryObserver*> RegisteredObservers;
RegisteredObservers _observers;
virtual void notify_change() = 0;
virtual void notify_change();
}; //~ class History