Scheduler
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
newProcess.h
Go to the documentation of this file.
1 
10 #ifndef NEW_PROCESS_H
11 #define NEW_PROCESS_H
12 
13 #include <memory>
14 #include "event.h"
15 
16 namespace Scheduler
17 {
18 
19 
22 class NewProcess : public Event
23 {
24 public:
25  NewProcess(double time, bool renew=true) : Event(time, renew){eventType=newprocess;};
26  virtual ~NewProcess();
27  virtual void process()=0;
28  virtual std::string getName()=0;
29 protected:
30  void queueProcess(std::shared_ptr<Process> p);
31  virtual void scheduleNextEvent()=0;
32  virtual std::shared_ptr<Process> createTask()=0;
33 };
34 
35 }
36 
37 #endif
virtual std::shared_ptr< Process > createTask()=0
void queueProcess(std::shared_ptr< Process > p)
Definition: newProcess.cpp:21
virtual void scheduleNextEvent()=0
virtual void process()=0
handle the the event TODO: &#39;process&#39; is maybe not the best word for that, given that our simulator ac...
virtual std::string getName()=0
get the name of the event
bool renew
Definition: event.h:59
TriggeringEvent eventType
The event type is need by the scheduling discipline, to determine if this kind of event triggers invo...
Definition: event.h:64
NewProcess(double time, bool renew=true)
Definition: newProcess.h:25
double time
Definition: event.h:58