summaryrefslogtreecommitdiff
path: root/lib/ChainTasks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ChainTasks.cc')
-rw-r--r--lib/ChainTasks.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/ChainTasks.cc b/lib/ChainTasks.cc
new file mode 100644
index 0000000..033cadf
--- /dev/null
+++ b/lib/ChainTasks.cc
@@ -0,0 +1,23 @@
+#include "ChainTasks.h"
+
+
+ChainTasks::ChainTasks(tasklist_t _tasklist) : tasklist(_tasklist) {
+ SetBurst();
+ pos = tasklist.begin();
+}
+
+ChainTasks::~ChainTasks() {
+}
+
+String ChainTasks::GetName() {
+ return "ChainTask";
+}
+
+int ChainTasks::Do() throw (GeneralException) {
+ if (pos == tasklist.end())
+ return TASK_DONE;
+
+ WaitFor(*pos);
+ pos++;
+ return TASK_ON_HOLD;
+}