#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