Frobby 0.10.0
Loading...
Searching...
No Matches
TaskEngine.h
1/* Frobby: Software for monomial ideal computations.
2 Copyright (C) 2009 University of Aarhus
3 Contact Bjarke Hammersholt Roune for license information (www.broune.com)
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see http://www.gnu.org/licenses/.
17*/
18#ifndef TASK_ENGINE_GUARD
19#define TASK_ENGINE_GUARD
20
21#include <vector>
22
23class Task;
24
40class TaskEngine {
41 public:
42 TaskEngine();
43 ~TaskEngine();
44
52 void addTask(Task* task);
53
59 bool runNextTask();
60
65 void runTasks();
66
71 size_t getTotalTasksEver();
72
74 void disposeAll();
75
76 private:
77 void dispose(Task* task);
78
81 size_t _totalTasksEver;
82
83 vector<Task*> _tasks;
84};
85
86#endif
void addTask(Task *task)
Definition TaskEngine.cpp:32
size_t getTotalTasksEver()
Definition TaskEngine.cpp:63
void disposeAll()
Definition TaskEngine.cpp:67
bool runNextTask()
Definition TaskEngine.cpp:47
void runTasks()
Definition TaskEngine.cpp:58
Definition Task.h:27