00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SJobMod.h,v 1.7 2003/03/13 19:24:18 taeubig Exp $ 00008 00009 Purpose : 00010 00011 RCS-Log: 00012 $Log: SJobMod.h,v $ 00013 Revision 1.7 2003/03/13 19:24:18 taeubig 00014 prob.dists in new dir, other changes, removed log messages 00015 00016 Revision 1.6 2003/01/24 10:05:02 hall 00017 brdCast stuff 00018 00019 Revision 1.5 2003/01/08 18:57:13 meierb 00020 added randomized release times 00021 00022 Revision 1.6 2003/01/08 15:29:24 meierb 00023 schlcht gelaufen mit der Pruefung 00024 00025 Revision 1.5 2003/01/06 22:27:47 meierb 00026 blablabla 00027 00028 Revision 1.4 2003/01/03 09:05:32 meierb 00029 worked at JobPropDialog and added new distribution 00030 00031 Revision 1.3 2002/12/18 16:20:00 meierb 00032 removed some file 00033 00034 Revision 1.2 2002/12/16 23:32:09 meierb 00035 *** empty log message *** 00036 00037 Revision 1.1.1.1 2002/12/02 22:26:19 meierb 00038 my_schedule 00039 00040 Revision 1.3 2002/11/11 16:52:55 taeubig 00041 header include changes 00042 00043 Revision 1.2 2002/11/09 19:35:55 taeubig 00044 <iostream> inclusion, added std:: 00045 00046 Revision 1.1 2002/08/29 12:59:59 taeubig 00047 Added the sources 00048 00049 Revision 1.2 2001/07/16 13:40:51 taeubig 00050 Added startTime for jobs 00051 00052 Revision 1.1 2000/05/29 19:51:23 taeubig 00053 Moved job type related files into subdirectory jobs 00054 00055 Revision 1.9 2000/01/30 03:04:23 taeubig 00056 Delete existing topology in setTopology() 00057 00058 Revision 1.8 2000/01/12 13:49:29 zoidl 00059 setWeight() moved to modifier 00060 00061 Revision 1.7 2000/01/12 02:29:30 taeubig 00062 Changed interface for clone() 00063 Deleted getX() functions in getXMod classes 00064 00065 Revision 1.6 2000/01/10 02:16:24 taeubig 00066 Added getJob() 00067 00068 Revision 1.5 1999/10/05 13:42:10 zoidl 00069 lots of new load- and save-routines 00070 00071 Revision 1.4 1999/06/17 16:34:33 hall 00072 STopology changed, tuned STSysSchedEvent-stuff and lost more! 00073 00074 Revision 1.3 1999/03/31 11:13:27 hall 00075 added a few output operators and save routines 00076 00077 Revision 1.2 1999/03/30 12:13:51 schickin 00078 dynamic_cast added, constructors for task system classes added 00079 00080 Revision 1.1 1999/03/23 14:26:43 schickin 00081 a lot of new code in /model: things compile but have no functionality 00082 00083 * #end# ************************************************************* */ 00084 00085 #ifndef SJOBMOD_H 00086 #define SJOBMOD_H 00087 00088 // system header files 00089 #include <iostream> 00090 #include <cassert> 00091 00092 // project header files 00093 #include "SJob.h" 00094 #include "../SModifier.h" 00095 00098 class SJobMod : public SModifier { 00099 public: 00100 SJobMod(SJob& job) : _job(job) 00101 {}; 00102 00103 // inherited member function 00104 00111 virtual bool load(std::istream &in); 00112 00117 virtual void save(std::ostream &out) const; 00118 00119 //virtual SJob* clone() { assert(false); }; 00120 00121 // new member functions 00122 00125 void setDueTime(double time) { _job._dueTime = time; } 00126 00130 void setProcTime(double proctime); 00131 /* 00132 * setProcTime() will only set a new proctime if proctime wasn't 00133 * set before or the proctimes are randomized 00134 */ 00135 void setProcTime(); 00136 00139 void setStartTime(double time, int operation = 0); 00140 00143 void setTopology(STopology* pTop); 00144 00147 void setIndex(int idx) { _job._index = idx; } 00148 00151 void setWeight(double w) { _job._weight = w; } 00152 00155 void setExpProcTime(double exp); 00156 void setProcTimeDist(SProbabilityDist* dist); 00157 00159 void setReleaseTime(double reltime); 00160 00161 private: 00162 SJob& _job; 00163 }; 00164 00165 #endif //SJOBMOD_H