00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SPrecDAGMod.h,v 1.4 2003/01/08 18:57:12 meierb Exp $ 00008 00009 Purpose : 00010 00011 RCS-Log: 00012 $Log: SPrecDAGMod.h,v $ 00013 Revision 1.4 2003/01/08 18:57:12 meierb 00014 added randomized release times 00015 00016 Revision 1.1.1.1 2002/12/02 22:26:19 meierb 00017 my_schedule 00018 00019 Revision 1.2 2002/11/09 17:59:49 taeubig 00020 <iostream> inclusion, added std:: 00021 00022 Revision 1.1 2002/08/29 12:59:58 taeubig 00023 Added the sources 00024 00025 Revision 1.14 2000/05/24 12:46:19 taeubig 00026 New compiler (gcc-2.95) and new Qt (2.1) 00027 Replaced "list" by "leda_list" etc. 00028 00029 Revision 1.13 2000/01/25 00:15:20 taeubig 00030 Cloning.. 00031 00032 Revision 1.12 2000/01/17 13:17:33 zoidl 00033 added javadoc comments 00034 00035 Revision 1.11 2000/01/17 10:51:12 zoidl 00036 addDependency now returns the inserted edge 00037 00038 Revision 1.10 1999/11/09 00:03:26 zoidl 00039 del'd debug code 00040 00041 Revision 1.9 1999/11/08 00:25:27 zoidl 00042 add/del one job, compressJobArray 00043 00044 Revision 1.8 1999/10/28 10:59:17 zoidl 00045 fixed bug in cycle-checking, changed add/delRelation to add/delDependency 00046 00047 Revision 1.7 1999/10/27 15:07:28 zoidl 00048 add/del edges in DAG 00049 00050 Revision 1.6 1999/10/13 14:43:45 zoidl 00051 added deletion of jobs in tasksystem and prec relation, and ´edges´ in 00052 load() of DAG to enable precedence 00053 00054 Revision 1.5 1999/10/05 13:42:24 zoidl 00055 lots of new load- and save-routines 00056 00057 Revision 1.4 1999/06/17 16:34:45 hall 00058 STopology changed, tuned STSysSchedEvent-stuff and lost more! 00059 00060 Revision 1.3 1999/03/31 11:13:31 hall 00061 added a few output operators and save routines 00062 00063 Revision 1.2 1999/03/29 12:49:00 schickin 00064 design of modifiers changed (SFooMod is now a member of SFoo). the stuff 00065 compiles and a simple test program runs fine. 00066 00067 Revision 1.1 1999/03/25 14:12:56 schickin 00068 several changes in /model (no real executable yet) 00069 00070 00071 * #end# ************************************************************* */ 00072 00073 #ifndef SPRECDAGMOD_H 00074 #define SPRECDAGMOD_H 00075 00076 // system header files 00077 #include <iostream> 00078 00079 // project header files 00080 #include "SPrecRelationMod.h" 00081 00082 class SPrecDAG; 00083 class STaskSystem; 00084 00088 class SPrecDAGMod : public SPrecRelationMod { 00089 public: 00092 SPrecDAGMod(SPrecDAG& prec) : _prec(prec) {}; 00093 00097 virtual void jobsAdded(const leda_list<SJob*>& newJobs); 00098 00102 virtual void jobsDeleted(const leda_list<SJob*>& jobs); 00103 00107 virtual void synchronize(); 00108 00109 virtual SPrecRelation* clone_for(STaskSystem& rTS); 00110 00118 virtual leda_edge addDependency(SJob& source, SJob& target, bool doCycleCheck=false); 00119 00126 virtual bool delDependency(SJob& source, SJob& target); 00127 00130 SPrecDAG& getDAG() { return _prec; }; 00131 00135 virtual bool load(std::istream &in); 00138 virtual void save(std::ostream &out) const; 00139 00140 virtual void sample() {}; 00141 private: 00144 void constructNodeToJob(); 00145 SPrecDAG& _prec; 00146 }; 00147 00148 #endif /* SPRECDAGMOD_H */