| 1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #define CFIGPATH "DingDing.yml"
- #include <string>
- class CConfigFile
- {
- public:
- static CConfigFile* getInstance() { return &instance; };
- bool load();
- bool isPush()const { return m_isPush; }
- std::string pushUrl()const { return m_url; }
- std::string projectName() const { return m_ProjectName; }
- std::int32_t heartTimeOut() const { return m_HeartTimeOut; }
- std::int32_t heartDelayTime() const { return m_HeartDelayTime; }
- private:
- CConfigFile();
- ~CConfigFile() = default;
- CConfigFile(const CConfigFile&) = default;
- CConfigFile& operator=(const CConfigFile&) = default;
- private:
- static CConfigFile instance;
- bool m_isPush;
- std::string m_url; // 推送地址
- std::string m_ProjectName; // 项目名字
- int m_HeartTimeOut; // 检测心跳超时时间 ,单位:分钟
- int m_HeartDelayTime; // 心跳延迟时间,单位:分钟, 超时推送后,多久再次提醒,0:本次不再提醒
- };
|