diff options
author | chai <chaifix@163.com> | 2018-10-23 12:23:58 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-23 12:23:58 +0800 |
commit | 40fc27154fe754181934dc7ee31375e6bdfb33fc (patch) | |
tree | 897ad98d759bc308ef66561181ba88b85f2ccd47 /src/libjin/Common/Subsystem.hpp | |
parent | 1480c9445100075c9e1a894eb07c0ef727b509a1 (diff) |
*merge from minimal
Diffstat (limited to 'src/libjin/Common/Subsystem.hpp')
-rw-r--r-- | src/libjin/Common/Subsystem.hpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/libjin/Common/Subsystem.hpp b/src/libjin/Common/Subsystem.hpp deleted file mode 100644 index 1374ad1..0000000 --- a/src/libjin/Common/Subsystem.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __JIN_COMMON_SUBSYSTEM_H -#define __JIN_COMMON_SUBSYSTEM_H - -#include "singleton.hpp" -#include "../utils/macros.h" - -namespace jin -{ - - template<class System> - class Subsystem : public Singleton<System> - { - public: - struct Setting {}; - typedef Setting SettingBase; - - bool init(const SettingBase* setting = nullptr) - { - static bool success = initSystem(setting); - return success; - } - - void quit() - { - CALLONCE(quitSystem()); - Singleton<System>::destroy(); - } - - protected: - - Subsystem() {}; - virtual ~Subsystem() {}; - - SINGLETON(System); - - /*onlyonce*/ virtual bool initSystem(const Setting* setting) = 0; - /*onlyonce*/ virtual void quitSystem() = 0; - - }; - -} // jin - -#endif
\ No newline at end of file |