00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: STSysVisEvent.h,v 1.4 2003/01/08 18:57:12 meierb Exp $ 00008 00009 Purpose : events which are interesting to visualization classes. 00010 these events are designed to carry as few information as 00011 possible. it is intended that the visualization classes 00012 fetch the simulation by themselves. exceptions from this 00013 rule should only be made if heavy performance problems 00014 are encountered. 00015 00016 RCS-Log: 00017 $Log: STSysVisEvent.h,v $ 00018 Revision 1.4 2003/01/08 18:57:12 meierb 00019 added randomized release times 00020 00021 Revision 1.1.1.1 2002/12/02 22:26:19 meierb 00022 my_schedule 00023 00024 Revision 1.2 2002/11/10 01:42:33 taeubig 00025 Added std:: for standard namespace, 00026 relative path corrections for header includes 00027 00028 Revision 1.1 2002/08/29 12:59:58 taeubig 00029 Added the sources 00030 00031 Revision 1.9 2000/01/17 17:38:06 zoidl 00032 added javadoc comments 00033 00034 Revision 1.8 1999/12/02 08:06:11 schickin 00035 SEvent-Hierarchie modified (STSysEvent is dead now) 00036 00037 Revision 1.7 1999/11/29 16:20:55 hall 00038 STSysEditEvent added, it's sent after adding/deleting jobs 00039 00040 Revision 1.6 1999/11/19 16:11:02 hall 00041 changed SObserver::update( SEvent & ) to ...( const SEvent & ) 00042 00043 Revision 1.5 1999/08/05 08:48:12 schickin 00044 purpose of important classes noted in the header-files 00045 00046 Revision 1.4 1999/04/27 13:39:43 schickin 00047 well folks, that's the first demo version that really runs 8-) 00048 00049 Revision 1.3 1999/02/09 17:17:20 schickin 00050 design changes: event system refined (+ interface of SSchedAlgorithm) 00051 00052 Revision 1.2 1999/01/29 10:03:58 schickin 00053 Project-Headers added. 00054 00055 00056 * #end# ************************************************************* */ 00057 00058 #ifndef STSYSVISEVENT_H 00059 #define STSYSVISEVENT_H 00060 00061 // system header files 00062 00063 // project header files 00064 #include "../general/SEvent.h" 00065 00073 class STSysVisEvent : public SEvent { 00074 public: 00077 enum Id { 00078 JOB, 00079 EDGE, 00080 NODEMOVED, // _data contains a pointer to the node 00081 BENDSCHANGED // _data contains a pointer to the corresponding 00082 // edge 00083 }; 00084 00088 union UserData { 00089 int intData; 00090 void* ptrData; 00091 00092 UserData(int i) : intData(i) {}; 00093 UserData(void *p) : ptrData(p) {}; 00094 }; 00095 00100 STSysVisEvent(Id id, const UserData &data) : _id(id), _data(data) {}; 00101 00104 Id getId() const { return _id; }; 00105 00108 const UserData &getChangedObj() const { return _data; }; 00109 00113 virtual Type getType() const { return VISEVENT; }; 00114 00115 private: 00116 Id _id; 00117 UserData _data; 00118 }; 00119 00120 #endif //STSYSVISEVENT_H 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132