00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SJobArray.h,v 1.4 2003/01/08 18:57:12 meierb Exp $ 00008 00009 Purpose : 00010 00011 RCS-Log: 00012 $Log: SJobArray.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/11 16:52:52 taeubig 00020 header include changes 00021 00022 Revision 1.1 2002/08/29 12:59:58 taeubig 00023 Added the sources 00024 00025 Revision 1.10 2000/05/29 19:53:56 taeubig 00026 New subdirectory structure 00027 00028 Revision 1.9 2000/05/24 12:46:06 taeubig 00029 New compiler (gcc-2.95) and new Qt (2.1) 00030 Replaced "list" by "leda_list" etc. 00031 00032 Revision 1.8 2000/01/17 17:38:07 zoidl 00033 added javadoc comments 00034 00035 Revision 1.7 2000/01/10 17:18:49 hall 00036 it's alive ... IT'S ALIVE ... ( resize() ) 00037 00038 Revision 1.6 2000/01/10 02:19:31 taeubig 00039 Why should we define resize(int)? 00040 (exists already, inherited from array) 00041 00042 Revision 1.5 1999/12/22 17:05:33 hall 00043 STopology is observable, added SJobArray::resize() + SLineTopMod::setSize() 00044 00045 Revision 1.4 1999/11/19 16:11:00 hall 00046 changed SObserver::update( SEvent & ) to ...( const SEvent & ) 00047 00048 Revision 1.3 1999/05/04 12:11:01 schickin 00049 small bugs removed (which came from the redesign of the diagrams) 00050 00051 Revision 1.2 1999/04/28 14:47:51 schickin 00052 All diagrams reformatted 00053 00054 Revision 1.1 1999/04/27 13:39:21 schickin 00055 well folks, that's the first demo version that really runs 8-) 00056 00057 00058 * #end# ************************************************************* */ 00059 00060 #ifndef SJOBARRAY_H 00061 #define SJOBARRAY_H 00062 00063 // system header files 00064 #include <LEDA/array.h> 00065 #include <LEDA/list.h> 00066 00067 // project header files 00068 #include "STaskSystemMod.h" 00069 #include "jobs/SJob.h" 00070 #include "../general/SObserver.h" 00071 #include "../general/SObservable.h" 00072 00082 class SJobArray : public leda_array<SJob*>, 00083 public SObserver, public SObservable 00084 { 00085 friend class STaskSystemMod; 00086 // this friendship is needed for the destruction of the job array 00087 friend class STaskSystem; 00088 public: 00091 SJobArray(); 00092 00095 SJobArray(const SJobArray& rArr); 00096 00100 SJobArray(int size); 00101 00104 ~SJobArray(); 00105 00108 virtual void update(const SEvent& event); 00109 00110 private: 00112 /*# SJob lnkUnnamed; */ 00115 void subscribeAll(); 00116 void unsubscribeAll(); 00118 void resize(int size); 00119 00120 bool _isSubscribed; 00121 }; 00122 00123 #endif /* SJOBARRAY_H */