From 8b00d67febf133e89f6a0bfabc41feed555dc4a9 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 12 Jan 2019 21:48:33 +0800 Subject: =?UTF-8?q?*=E5=8E=BB=E6=8E=89=E6=96=87=E4=BB=B6=E5=89=8D=E7=BC=80?= =?UTF-8?q?je=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/common/je_subsystem.hpp | 74 -------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 src/libjin/common/je_subsystem.hpp (limited to 'src/libjin/common/je_subsystem.hpp') 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 Subsystem : public Singleton - { - 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::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 -- cgit v1.1-26-g67d0