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

model/SRecEvent.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: SRecEvent.h,v 1.5 2003/03/13 19:24:03 taeubig Exp $
00008 
00009  Purpose : An event, that will be recorded to file by SPlayerLog, 
00010            and played by SPlayer. It stores an SEvent and
00011            all necessary information, that is needed by the Player to 
00012            let him act exactly as an algorithm.
00013 
00014  * #end# ************************************************************* */
00015 
00016 #ifndef SRECEVENT_H
00017 #define SRECEVENT_H
00018 
00019 #include "STaskSystem.h"
00020 #include "../general/SUtil.h"
00021 #include "../general/SEvent.h"
00022 
00029 class SRecEvent : public SEvent
00030 {
00031   NOCOPY(SRecEvent);
00032   //DUMMYIO(SRecEvent);
00033 
00034  public:
00040   SRecEvent(const SEvent& ev, const STaskSystem& ts);
00041   
00046   SRecEvent(const SEvent& ev);
00047 
00048   /* Destructor
00049    */
00050   virtual ~SRecEvent();
00051   
00056   virtual void write(std::ostream& os) const;
00057   
00063   double getTimeStamp() const
00064     { return _timeStamp; };
00065 
00070   void setTimeStamp(double time)
00071     { _timeStamp = time; }    
00072   
00077   const SEvent& getEvent() const
00078     { return *_ev; }
00079   
00080  private:
00081   // have to store the event as a pointer here, because I don't know
00082   // what event type will be stored
00084   SEvent* _ev;
00085   double _timeStamp;
00086   // just a helper for the constructors
00087   void copyNstore(const SEvent&);
00088 };
00089 
00090 #endif

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