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

ScheduledEvent.h

Go to the documentation of this file.
00001 // $Id: ScheduledEvent.h,v 1.3 2000/01/23 03:34:39 pfkeb Exp $
00002 
00003 #ifndef SCHEDULEDEVENT_H
00004 #define SCHEDULEDEVENT_H
00005 
00006 #include <string>
00007 
00008 class Scheduler;
00009 
00010 class ScheduledEvent 
00011 {
00012     // abstract base class for an event that is scheduled by the ScheduledEvent class
00013 public:
00014     virtual ~ScheduledEvent(){}
00015 
00016     virtual void execute()=0;
00017     // perform the task (must be implemented)
00018 
00019     virtual std::string name()const;
00020     // describe the event. Default is the class name from class info
00021 
00022 protected:
00023     ScheduledEvent(){};
00024 
00025     static void schedule(double t, ScheduledEvent* next);
00026     // subclass can easily schedule a new event
00027 
00028 private:
00029     friend class Scheduler;
00030 
00031 };
00032 #endif

Generated at Wed Nov 21 12:20:21 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000