diff options
| author | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
| commit | 8b00d67febf133e89f6a0bfabc41feed555dc4a9 (patch) | |
| tree | fe48ef17c250afa40c2588300fcdb5920dba6951 /src/libjin/common/je_subsystem.hpp | |
| parent | a907c39756ef6b368d06643afa491c49a9044a8e (diff) | |
*去掉文件前缀je_
Diffstat (limited to 'src/libjin/common/je_subsystem.hpp')
| -rw-r--r-- | src/libjin/common/je_subsystem.hpp | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/src/libjin/common/je_subsystem.hpp b/src/libjin/common/je_subsystem.hpp deleted file mode 100644 index 8f682ef..0000000 --- a/src/libjin/common/je_subsystem.hpp +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __JE_COMMON_SUBSYSTEM_H__ -#define __JE_COMMON_SUBSYSTEM_H__ - -#include "../utils/je_macros.h" - -#include "je_singleton.hpp" - -namespace JinEngine -{ - - /// - /// Subsystem class. - /// - template<class System> - class Subsystem : public Singleton<System> - { - public: - /// - /// Subsystem setting. - /// - struct Setting - { - }; - - typedef Setting SettingBase; - - /// - /// Initialize subsystem. - /// - /// @param setting Subsystem setting. - /// @return True if initialize sucessful, otherwise return false. - /// - bool start(const SettingBase* setting = nullptr) - { - static bool success = startSystem(setting); - return success; - } - - /// - /// Quit subsystem. - /// - void quit() - { - // Call only once. - static char __dummy__ = (quitSystem(), 1); - Singleton<System>::destroy(); - } - - /// - /// Subsystem constructor. - /// - Subsystem() {}; - - /// - /// Subsystem destructor. - /// - virtual ~Subsystem() {} - - protected: - /// - /// Initializer callback. - /// - virtual bool startSystem(const Setting* setting) = 0; - - /// - /// Quit subsystem callback. - /// - virtual void quitSystem() = 0; - - }; - -} // namespace JinEngine - -#endif
\ No newline at end of file |
