/* * @Description: * @Version: 1.0 * @Autor: lishengyin * @Date: 2022-04-12 08:37:45 * @LastEditors: lishengyin * @LastEditTime: 2022-04-12 10:16:08 */ #ifndef __DISPOSITION_HPP_ #define __DISPOSITION_HPP_ #include #include "NonCopyable.hpp" #include #include "login.hpp" #include "Util/logger.h" #include "Util/NoticeCenter.h" #include "Poller/EventPoller.h" #include "Util/SqlPool.h" #include "Network/TcpClient.h" #include "Poller/Timer.h" #include using namespace std; using namespace toolkit; class Disposition:private NonCopyable { private: Disposition(){} public: using Ptr = std::shared_ptr; ~Disposition(){} /** * @description: 获取ptr * @param {*} * @return {*} */ static std::shared_ptr getPtr(); /** * @description: 初始化 * @param {*} * @return {*} */ bool Init(); /** * @description: 获取用户合法 * @param {*} * @return {*} */ bool getUserValidity(Login& login); /** * @description: 获取用户数据 * @param {*} * @return {*} */ bool getUserInfos(); protected: std::string mysqlIP = "101.35.200.152"; int port = 13306; map LoginInfos; }; #endif