diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Main.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/Main.h b/includes/Main.h index 44764a3..3f81137 100644 --- a/includes/Main.h +++ b/includes/Main.h @@ -44,8 +44,13 @@ namespace Balau { class MainTask : public Task { public: + MainTask() : m_stopTaskManOnExit(true) { } + virtual ~MainTask() { if (m_stopTaskManOnExit) TaskMan::getTaskMan()->stop(); } virtual const char * getName() { return "Main Task"; } virtual void Do(); + void stopTaskManOnExit(bool v) { m_stopTaskManOnExit = v; } + private: + bool m_stopTaskManOnExit; }; class Main { |