1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #ifndef __USERAPP_HPP_
- #define __USERAPP_HPP_
- #include <iostream>
- #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"
- #include "AuditPlugin.hpp"
- using namespace std;
- using namespace toolkit;
- namespace gsd
- {
- class UserApp
- {
- private:
- UserApp(){
- InfoL;
- }
- public:
- using Ptr = std::shared_ptr<UserApp>;
- /**
- * @description: CreateNew
- * @return {*}
- */
- static std::shared_ptr<UserApp> 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;
- AuditPlugin::Ptr m_AuditPlugin = nullptr;
-
- Timer::Ptr timer0 = nullptr;
- };
- } // namespace gsd
- #endif
|