- 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

@ -45,6 +45,7 @@ namespace sgpem
public:
DynamicThread(StaticThread* core, DynamicProcess* parent);
DynamicThread(const DynamicThread &other);
virtual ~DynamicThread();
DynamicProcess& get_process();
@ -54,13 +55,16 @@ namespace sgpem
std::vector<Request*> get_requests();
void remove_request(Request* request);
void add_request(DynamicRequest* request);
void serialize(SerializeVisitor& translator) const;
virtual StaticThread& get_core();
virtual const StaticThread& get_core() const;
// Does also the job of "add_request" and "remove_request"
std::vector<DynamicRequest*>& get_dynamic_requests();
private:
memory::smart_ptr<StaticThread> _core;
state _state;
std::vector<DynamicRequest*> _dynamic_requests;
DynamicProcess* _parent;