KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sysinfo.h
Go to the documentation of this file.
1/*
2* This program source code file is part of KiCad, a free EDA CAD application.
3*
4* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software; you can redistribute it and/or
7* modify it under the terms of the GNU General Public License
8* as published by the Free Software Foundation; either version 2
9* of the License, or (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20#ifndef SYSINFO_H
21#define SYSINFO_H
22
23#include <cstdint>
24#include <string>
25#include <vector>
26
27namespace KIPLATFORM
28{
30{
31public:
32 std::string Name;
33 long long MemorySize;
34 std::string DriverVersion;
35 std::string Manufacturer;
36};
37
39{
40public:
41 std::string Name;
42 std::string Manufacturer;
43 uint32_t NumberCores;
44 uint32_t NumberLogical;
45};
46
48{
49public:
50 uint32_t Usage;
51 uint64_t TotalPhysical;
52 uint64_t FreePhysical;
53 uint64_t TotalPaging;
54 uint64_t FreePaging;
55 uint64_t TotalVirtual;
56 uint64_t FreeVirtual;
57};
58
60{
61public:
69 virtual bool GetGPUInfo( std::vector<GPU_INFO>& aGpuInfos ) = 0;
70
78 virtual bool GetCPUInfo( std::vector<CPU_INFO>& aCpuInfos ) = 0;
79
87 virtual bool GetMemoryInfo( MEMORY_INFO& aMemoryInfo ) = 0;
88};
89} // namespace KIPLATFORM
90
91#if defined( _WIN32 )
93#elif defined( __unix__ ) || defined( __unix )
95#elif defined( __APPLE__ )
97#else
98
99#endif
100#endif // SYSINFO_H
virtual bool GetGPUInfo(std::vector< GPU_INFO > &aGpuInfos)=0
Retrieve GPU info for the system.
virtual bool GetCPUInfo(std::vector< CPU_INFO > &aCpuInfos)=0
Retrieve CPU info for the system.
virtual bool GetMemoryInfo(MEMORY_INFO &aMemoryInfo)=0
Retrieve memory info for the system.
std::string Name
Definition sysinfo.h:41
uint32_t NumberCores
Definition sysinfo.h:43
uint32_t NumberLogical
Definition sysinfo.h:44
std::string Manufacturer
Definition sysinfo.h:42
std::string Name
Definition sysinfo.h:32
std::string DriverVersion
Definition sysinfo.h:34
long long MemorySize
Definition sysinfo.h:33
std::string Manufacturer
Definition sysinfo.h:35