#ifndef __USERAPP_HPP_ #define __USERAPP_HPP_ #include #include "Util/SqlPool.h" #include "UtilBase.hpp" #include "Util/logger.h" #include "config.hpp" #include "HttpPlugin.hpp" #include "TcpPlugin.hpp" #include "ExpelPlugin.hpp" #include "MonitorPlugin.hpp" using namespace std; using namespace toolkit; namespace gsd { class UserApp { private: UserApp(){ InfoL; } public: using Ptr = std::shared_ptr; /** * @description: CreateNew * @return {*} */ static std::shared_ptr CreateNew(); /** * @description: 初始化 * @return {*} */ virtual bool Init(); /** * @description: StartTask * @return {*} */ virtual bool StartTask(); /** * @description: 释放 * @return {*} */ virtual void Destroy(); /** * @description: Alive * @return {*} */ virtual bool Alive(); /** * @description: ~UserApp * @return {*} */ ~UserApp(){ this->Destroy(); } protected: HttpPlugin::Ptr m_HttpPlugin = nullptr; TcpPlugin::Ptr m_TcpPlugin = nullptr; ExpelPlugin::Ptr m_ExpelPlugin = nullptr; MonitorPlugin::Ptr m_MonitorPlugin = nullptr; Timer::Ptr timer0 = nullptr; }; } // namespace gsd #endif