summaryrefslogtreecommitdiffstats
path: root/engine/flattask.cpp
blob: b71f9d7391cd3d9a8bfd856de55e77788ce6d199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "flattask.h"

/* Static variable definition */
std::list<task_s*> task_s::tasks;

task_s::task_s()
{
    /* Push into the public callback list */
    tasks.push_back(this);
}

task_s::~task_s()
{
    /* Remove from the public callback list */
    tasks.remove(this);
}

void task_s::executeAll()
{
    for (task_s * task : task_s::tasks)
        task->exec();
}