summaryrefslogtreecommitdiffstats
path: root/engine/flattask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine/flattask.cpp')
-rw-r--r--engine/flattask.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/engine/flattask.cpp b/engine/flattask.cpp
deleted file mode 100644
index 02e584e..0000000
--- a/engine/flattask.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include "flattask.h"
-
-bool task_prior::operator()(task_s* s, task_s* g) const
-{
- return s->getPriority() <= g->getPriority();
-}
-
-/* Static variable definition */
-task_set task_s::pre_process_tasks;
-task_set task_s::post_process_tasks;
-
-task_s::task_s(bool pre_process, Uint8 priority)
-
- : pre_process(pre_process), priority(priority)
-{
- /* Push into the public callback list */
- if (pre_process)
- pre_process_tasks.insert(this);
- else
- post_process_tasks.insert(this);
-}
-
-task_s::~task_s()
-{
- /* Remove from the public callback list */
- if (pre_process)
- pre_process_tasks.erase(this);
- else
- post_process_tasks.erase(this);
-}
-
-Uint8 task_s::getPriority() const
-{
- return priority;
-}
-
-void task_s::setPriority(Uint8 priority)
-{
- this->priority = priority;
-}
-
-void task_s::executePreProcess()
-{
- for (task_s * task : task_s::pre_process_tasks)
- task->exec();
-}
-
-void task_s::executePostProcess()
-{
- for (task_s * task : task_s::post_process_tasks)
- task->exec();
-}
-