00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SPrecDAG.h,v 1.3 2003/01/08 18:57:12 meierb Exp $ 00008 00009 Purpose : 00010 00011 RCS-Log: 00012 $Log: SPrecDAG.h,v $ 00013 Revision 1.3 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.1 2002/08/29 12:59:58 taeubig 00020 Added the sources 00021 00022 Revision 1.13 2000/05/24 12:46:16 taeubig 00023 New compiler (gcc-2.95) and new Qt (2.1) 00024 Replaced "list" by "leda_list" etc. 00025 00026 Revision 1.12 2000/01/17 13:17:32 zoidl 00027 added javadoc comments 00028 00029 Revision 1.11 1999/11/23 19:49:13 zoidl 00030 added getTaskSystem() (for SVisPrecDAGMod) 00031 00032 Revision 1.10 1999/11/19 14:53:22 hall 00033 SSetTopology.setSize(..) implemented, SVisPrecDAG enhanced 00034 00035 Revision 1.9 1999/10/07 15:57:22 hall 00036 TaskSystem in PrecBroker isn't const anymore 00037 00038 Revision 1.8 1999/06/17 16:34:42 hall 00039 STopology changed, tuned STSysSchedEvent-stuff and lost more! 00040 00041 Revision 1.7 1999/04/27 13:39:32 schickin 00042 well folks, that's the first demo version that really runs 8-) 00043 00044 Revision 1.6 1999/03/29 12:48:58 schickin 00045 design of modifiers changed (SFooMod is now a member of SFoo). the stuff 00046 compiles and a simple test program runs fine. 00047 00048 Revision 1.5 1999/03/25 14:12:52 schickin 00049 several changes in /model (no real executable yet) 00050 00051 Revision 1.4 1999/03/23 14:26:50 schickin 00052 a lot of new code in /model: things compile but have no functionality 00053 00054 Revision 1.3 1999/01/29 10:03:46 schickin 00055 Project-Headers added. 00056 00057 00058 * #end# ************************************************************* */ 00059 00060 #ifndef SPRECDAG_H 00061 #define SPRECDAG_H 00062 00063 #include <LEDA/graph.h> 00064 #include <LEDA/array.h> 00065 #include <LEDA/node_array.h> 00066 00067 #include "SPrecDAGInt.h" 00068 #include "SPrecDAGMod.h" 00069 #include "SVisPrecDAG.h" 00070 00078 class SPrecDAG : public SPrecDAGInt { 00079 TYPEINFO0(SPrecDAG, "Dag"); 00080 friend class SPrecDAGMod; 00081 public: 00084 SPrecDAG(STaskSystem &ts) : _pTaskSys(&ts), _visPrecDAG(*this), _mod(*this) {}; 00085 00088 virtual const leda_graph& getGraph() const { return _dag; }; 00089 00092 virtual SVisPrecDAG &getVisPrecDAG() { return _visPrecDAG; }; 00093 00096 virtual SPrecRelationMod &getModifier() 00097 { return _mod; }; 00098 00104 virtual bool isAvailable(const SJob& job) const; 00105 00110 leda_node getNode(const SJob& job) const 00111 { return _jobToNode[job.getIndex()]; }; 00112 00117 SJob &getJob(leda_node v) const 00118 { return *_nodeToJob[v]; }; 00119 00122 const STaskSystem& getTaskSystem() const // needed by SVisPrecDAGMod 00123 { return *_pTaskSys; }; 00124 00125 private: 00126 STaskSystem* _pTaskSys; // can't be const, because of getJob(..) 00127 00128 leda_graph _dag; 00129 leda_array<leda_node> _jobToNode; 00130 leda_node_array<SJob*> _nodeToJob; 00131 00132 SVisPrecDAG _visPrecDAG; 00133 00134 SPrecDAGMod _mod; 00135 }; 00136 00137 #endif //SPRECDAG_H