diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-02 10:04:38 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-02 10:22:15 +0200 |
commit | 6d956657c4612e988f89a133cea93e50ec2dcb39 (patch) | |
tree | e5f360dd667145934141549fad1866e61b87e5bf /includes | |
parent | 7f4f068ebdfd51c358648e514660b23d586d4929 (diff) |
Adding AtStartAsTask and AtExitAsTask concepts.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/AtStartExit.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/includes/AtStartExit.h b/includes/AtStartExit.h index 97dc533..4cd49a5 100644 --- a/includes/AtStartExit.h +++ b/includes/AtStartExit.h @@ -2,6 +2,9 @@ namespace Balau { +class Task; +class BootstrapTask; + class AtStart { protected: AtStart(int priority = 0); @@ -28,4 +31,30 @@ class AtExit { friend class Main; }; +class AtStartAsTask { + protected: + AtStartAsTask(int priority = 0); + virtual Task * createStartTask() = 0; + private: + AtStartAsTask(const AtStartAsTask &) = delete; + AtStart & operator=(const AtStartAsTask &) = delete; + const int m_priority; + AtStartAsTask * m_next; + static AtStartAsTask * s_head; + friend class BootstrapTask; +}; + +class AtExitAsTask { + protected: + AtExitAsTask(int priority = 0); + virtual Task * createExitTask() = 0; + private: + AtExitAsTask(const AtExit &) = delete; + AtExitAsTask & operator=(const AtExitAsTask &) = delete; + const int m_priority; + AtExitAsTask * m_next; + static AtExitAsTask * s_head; + friend class BootstrapTask; +}; + }; |