00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __loaded__ao_scheduler_h__
00021 #define __loaded__ao_scheduler_h__
00022 using namespace std;
00023 #line 1 "ao-scheduler.h++"
00024 #include "lock.h"
00025
00033 class Runnable
00034 {
00035 public:
00039 string name;
00043 virtual bool run(bool continuous) = 0;
00047 virtual bool terminated() = 0;
00048 Runnable(string name) : name(name)
00049 {
00050 }
00051 virtual ~Runnable()
00052 {
00053 };
00054 };
00055
00062 class Scheduler
00063 {
00064 public:
00070 virtual void start(Runnable * who) = 0;
00071 virtual ~Scheduler()
00072 {
00073 };
00074 };
00075
00082 class SpawnWhenActivated: public Scheduler
00083 {
00084 public:
00085 virtual void start(Runnable * torun);
00086 };
00087 #endif // __loaded__ao_scheduler_h__