2009-10-02 01:21:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
KWSys - Kitware System Library
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2008-01-08 19:38:28 +03:00
|
|
|
|
2009-10-02 01:21:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2008-01-08 19:38:28 +03:00
|
|
|
|
2009-10-02 01:21:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2008-01-08 19:38:28 +03:00
|
|
|
#ifndef @KWSYS_NAMESPACE@_SystemInformation_h
|
|
|
|
#define @KWSYS_NAMESPACE@_SystemInformation_h
|
|
|
|
|
2008-01-09 01:51:05 +03:00
|
|
|
|
2008-01-30 19:17:36 +03:00
|
|
|
/* Define these macros temporarily to keep the code readable. */
|
|
|
|
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
|
|
|
|
# define kwsys_stl @KWSYS_NAMESPACE@_stl
|
|
|
|
# define kwsys_ios @KWSYS_NAMESPACE@_ios
|
|
|
|
#endif
|
2008-01-08 19:38:28 +03:00
|
|
|
#include <@KWSYS_NAMESPACE@/stl/string>
|
2010-01-29 00:48:20 +03:00
|
|
|
#include <stddef.h> /* size_t */
|
2008-01-31 22:34:11 +03:00
|
|
|
|
2008-01-08 19:38:28 +03:00
|
|
|
namespace @KWSYS_NAMESPACE@
|
|
|
|
{
|
|
|
|
|
|
|
|
|
2008-01-31 22:34:11 +03:00
|
|
|
// forward declare the implementation class
|
|
|
|
class SystemInformationImplementation;
|
|
|
|
|
2008-03-12 00:37:17 +03:00
|
|
|
class @KWSYS_NAMESPACE@_EXPORT SystemInformation
|
2008-01-08 19:38:28 +03:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
SystemInformation ();
|
|
|
|
~SystemInformation ();
|
|
|
|
|
|
|
|
const char * GetVendorString();
|
|
|
|
const char * GetVendorID();
|
2008-01-08 22:59:57 +03:00
|
|
|
kwsys_stl::string GetTypeID();
|
|
|
|
kwsys_stl::string GetFamilyID();
|
|
|
|
kwsys_stl::string GetModelID();
|
|
|
|
kwsys_stl::string GetSteppingCode();
|
2008-01-08 19:38:28 +03:00
|
|
|
const char * GetExtendedProcessorName();
|
|
|
|
const char * GetProcessorSerialNumber();
|
|
|
|
int GetProcessorCacheSize();
|
2009-03-20 05:48:05 +03:00
|
|
|
unsigned int GetLogicalProcessorsPerPhysical();
|
2008-01-08 19:38:28 +03:00
|
|
|
float GetProcessorClockFrequency();
|
|
|
|
int GetProcessorAPICID();
|
|
|
|
int GetProcessorCacheXSize(long int);
|
|
|
|
bool DoesCPUSupportFeature(long int);
|
|
|
|
|
|
|
|
const char * GetOSName();
|
|
|
|
const char * GetHostname();
|
|
|
|
const char * GetOSRelease();
|
|
|
|
const char * GetOSVersion();
|
|
|
|
const char * GetOSPlatform();
|
|
|
|
|
|
|
|
bool Is64Bits();
|
|
|
|
|
|
|
|
unsigned int GetNumberOfLogicalCPU(); // per physical cpu
|
|
|
|
unsigned int GetNumberOfPhysicalCPU();
|
|
|
|
|
|
|
|
bool DoesCPUSupportCPUID();
|
|
|
|
|
|
|
|
// Retrieve memory information in megabyte.
|
2010-01-29 00:48:20 +03:00
|
|
|
size_t GetTotalVirtualMemory();
|
|
|
|
size_t GetAvailableVirtualMemory();
|
|
|
|
size_t GetTotalPhysicalMemory();
|
|
|
|
size_t GetAvailablePhysicalMemory();
|
2008-01-08 19:38:28 +03:00
|
|
|
|
|
|
|
/** Run the different checks */
|
|
|
|
void RunCPUCheck();
|
|
|
|
void RunOSCheck();
|
|
|
|
void RunMemoryCheck();
|
2008-01-31 22:34:11 +03:00
|
|
|
private:
|
|
|
|
SystemInformationImplementation* Implementation;
|
2008-01-08 19:38:28 +03:00
|
|
|
|
|
|
|
};
|
|
|
|
} // namespace @KWSYS_NAMESPACE@
|
2008-01-30 19:17:36 +03:00
|
|
|
|
|
|
|
/* Undefine temporary macros. */
|
|
|
|
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
|
|
|
|
# undef kwsys_stl
|
|
|
|
# undef kwsys_ios
|
|
|
|
#endif
|
|
|
|
|
2008-01-08 19:38:28 +03:00
|
|
|
#endif
|