From f4e683fc6bd6ac76f9979f49d737588b6ddf16b0 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 14 11月 2020 22:13:13 +0800 Subject: [PATCH] windows smbios --- src/library/os/cpu_info.hpp | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/library/os/cpu_info.hpp b/src/library/os/cpu_info.hpp index 716ca40..c837493 100644 --- a/src/library/os/cpu_info.hpp +++ b/src/library/os/cpu_info.hpp @@ -9,11 +9,15 @@ #define SRC_LIBRARY_OS_CPU_INFO_H_ #include <string> namespace license { +namespace os { /** * Cpu informations */ class CpuInfo { +private: + const std::string m_vendor; + const std::string m_brand; public: CpuInfo(); virtual ~CpuInfo(); @@ -21,11 +25,12 @@ * Detect Virtual machine using hypervisor bit or the cpu vendor name. * @return true if the cpu is detected to be a virtual cpu */ - bool cpu_virtual() const; - uint32_t model(); - std::string vendor() const; + uint32_t model() const; + bool is_hypervisor_set() const; + const std::string& vendor() const { return m_vendor; } + const std::string& brand() const { return m_brand; } }; -} /* namespace license */ - +} // namespace os +} // namespace license #endif /* SRC_LIBRARY_OS_CPU_INFO_H_ */ -- Gitblit v1.9.1