00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SEvent.h,v 1.4 2003/01/08 18:57:11 meierb Exp $ 00008 00009 Purpose : base class for all kinds of events which use the observer 00010 mechanism. this class is not yet used as such (since it 00011 does not carry any information about the sender and the 00012 type of the event). only subclasses are in actual use. 00013 00014 RCS-Log: 00015 $Log: SEvent.h,v $ 00016 Revision 1.4 2003/01/08 18:57:11 meierb 00017 added randomized release times 00018 00019 Revision 1.1.1.1 2002/12/02 22:26:19 meierb 00020 my_schedule 00021 00022 Revision 1.2 2002/11/09 02:51:03 taeubig 00023 Replaced <iostream.h> header inclusion by <iostream>, cerr by std::cerr... 00024 00025 Revision 1.1 2002/08/29 12:59:58 taeubig 00026 Added the sources 00027 00028 Revision 1.7 2000/06/14 18:58:39 taeubig 00029 Added support for algorithm runtime comments 00030 00031 Revision 1.6 2000/01/11 17:26:10 zoidl 00032 added javadoc comments 00033 00034 Revision 1.5 1999/12/02 08:06:05 schickin 00035 SEvent-Hierarchie modified (STSysEvent is dead now) 00036 00037 Revision 1.4 1999/08/05 08:47:50 schickin 00038 purpose of important classes noted in the header-files 00039 00040 Revision 1.3 1999/04/27 13:38:48 schickin 00041 well folks, that's the first demo version that really runs 8-) 00042 00043 Revision 1.2 1999/01/29 10:03:27 schickin 00044 Project-Headers added. 00045 00046 00047 * #end# ************************************************************* */ 00048 00049 #ifndef SEVENT_H 00050 #define SEVENT_H 00051 00052 #include <iostream> 00053 00059 class SEvent { 00060 public: 00064 enum Type {ILLEGAL, SCHEDEVENT, VISEVENT, EDITEVENT, PREFEVENT, ALGEVENT}; 00065 00070 virtual Type getType() const 00071 { return ILLEGAL; }; 00072 00078 virtual void write(std::ostream& rOs) const 00079 { rOs << "opaque event"; }; 00080 }; 00081 00082 inline 00083 std::ostream& operator<<(std::ostream& rOs, const SEvent& ev) 00084 { 00085 ev.write(rOs); 00086 return rOs; 00087 } 00088 00089 #endif //SEVENT_H 00090 00091