mirror of
https://github.com/modelec/MarcelMoteur.git
synced 2026-01-18 16:27:22 +01:00
30 lines
362 B
C++
30 lines
362 B
C++
#include "Task.h"
|
|
|
|
// Constructeur
|
|
Task::Task() : is_running(false) {}
|
|
|
|
Task::~Task()
|
|
{
|
|
// Si la tâche est en cours d'exécution, on l'arrête
|
|
stop();
|
|
}
|
|
|
|
// Démarre la tâche
|
|
void Task::start()
|
|
{
|
|
|
|
is_running = true;
|
|
}
|
|
|
|
// Arrête la tâche
|
|
void Task::stop()
|
|
{
|
|
|
|
is_running = false;
|
|
}
|
|
|
|
// Getters
|
|
bool Task::isRunning()
|
|
{
|
|
return is_running;
|
|
} |