Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

algorithms/SPlayer.h

Go to the documentation of this file.
00001 /* #start# ***********************************************************
00002 
00003            Scheduling Simulator
00004         Lehrstuhl f"ur Effiziente Algorithmen
00005            Technische Universit"at M"unchen
00006 
00007  File    : $Id: SPlayer.h,v 1.5 2003/01/08 18:57:11 meierb Exp $
00008 
00009  Purpose : this class takes a sched action list and replays its
00010            contents as if the 'real' algorithm would be running.
00011            from the outside its behavior cannot be distinguished
00012            from the actual algorithm.
00013 
00014  RCS-Log:
00015  $Log: SPlayer.h,v $
00016  Revision 1.5  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.3  2002/11/13 18:18:29  taeubig
00023  Workarounds for using LEDA 4.4 and also the former releases
00024 
00025  Revision 1.2  2002/11/10 13:32:52  taeubig
00026  namespace and header include changes
00027 
00028  Revision 1.1  2002/08/29 12:59:58  taeubig
00029  Added the sources
00030 
00031  Revision 1.8  2000/07/05 21:51:43  mayerh
00032  added method getLeaBibEntry and made some changes
00033 
00034  Revision 1.7  2000/05/24 12:21:10  taeubig
00035  New compiler (gcc-2.95) and new Qt (2.1)
00036  Replaced "list" by "leda_list" etc.
00037 
00038  Revision 1.6  2000/05/08 19:57:25  mayerh
00039  added default constructor
00040 
00041  Revision 1.5  2000/03/31 08:21:25  hall
00042  small cosmetic changes
00043 
00044  Revision 1.4  2000/03/30 19:14:00  mayerh
00045  added member-functions getClassification() and getName()
00046 
00047  Revision 1.3  2000/01/18 11:11:55  zoidl
00048  del'd private pointer to tasksys, using getTaskSystem() now
00049 
00050  Revision 1.2  2000/01/12 11:31:37  zoidl
00051  added javadoc comments and cosmetic changes in getDescription
00052 
00053  Revision 1.1  2000/01/10 17:20:41  zoidl
00054  removed bug with playing McNaughton and Johnson, moved to algorithms/
00055 
00056  Revision 1.10  1999/12/21 15:35:56  zoidl
00057  added getDescription()
00058 
00059  Revision 1.9  1999/12/08 23:02:19  zoidl
00060  added player-support for shop jobs
00061 
00062  Revision 1.8  1999/11/11 13:30:28  zoidl
00063  player works now
00064 
00065  Revision 1.7  1999/11/10 15:08:48  zoidl
00066  changes for job state in STSysSchedEvent
00067 
00068  Revision 1.6  1999/11/09 00:05:26  zoidl
00069  player frame
00070 
00071  Revision 1.5  1999/11/08 00:30:01  zoidl
00072  added suggestion for SPlayer
00073 
00074  Revision 1.4  1999/08/05 08:47:56  schickin
00075  purpose of important classes noted in the header-files
00076 
00077  Revision 1.3  1999/01/29 10:03:31  schickin
00078  Project-Headers added.
00079 
00080 
00081  * #end# ************************************************************* */
00082 
00083 #ifndef SPLAYER_H
00084 #define SPLAYER_H
00085 
00086 // system header files
00087 
00088 // project header files
00089 #include "SSchedAlgorithm.h"
00090 #include "../logging/SSchedActionList.h"
00091 #include "../model/STaskSystem.h"
00092 #include "../model/SRecEvent.h"
00093 
00101 class SPlayer : public SSchedAlgorithm {
00102  public:
00103 
00108   SPlayer();
00109   SPlayer(STaskSystem* pTS);
00110   
00113   virtual ~SPlayer();
00114   
00120   bool load(std::istream& in);
00121   
00122   virtual void startup();
00123   virtual double innerLoop(const leda_list<STSysSchedEvent>&);
00124   
00130   virtual bool isFinished() const;
00131   virtual const leda_string getDescription() const;
00132 
00133   virtual const leda_string &getName() const;
00134   virtual const SClassification &getClassification() const;
00135   virtual SLeaBibEntry &getLeaBibEntry() const;
00136 
00143   int getNumOfAllEvents() const
00144     { return _rActionList.length(); };
00145 
00150   int getNumOfCurEvent() const
00151     { return _currEventNum; };  
00152   
00153  private:
00154   // stores all events loaded by load()
00155   leda_list<SRecEvent*> _rActionList;
00156   // the current position in _rActionList;
00157   leda_list_item _currItem;
00158   bool _isStart;
00159   int _currEventNum;
00160   double _myTimeStamp;
00161   // stopTime is one simStep before the end of schedule
00162   double _stopTime;
00163 };
00164 
00165 #endif //SPLAYER_H
00166 
00167 
00168 
00169 

Generated on Thu May 22 16:48:08 2003 for Sketch-it! by doxygen1.2.18