| 123456789101112131415161718192021222324252627 |
- #ifndef SYSINFO_H
- #define SYSINFO_H
- /**
- * @brief The SysInfo 接口
- */
- class SysInfo {
- public:
- static SysInfo& instance();
- virtual ~SysInfo();
- // Allows the derived class to perform any initialization process depending on
- // the OS platform
- virtual void init() = 0;
- virtual double cpuLoadAverage() = 0;
- virtual double memoryUsed() = 0;
- protected:
- explicit SysInfo();
- private:
- SysInfo(const SysInfo& rhs);
- SysInfo& operator=(const SysInfo& rhs);
- };
- #endif // SYSINFO_H
|