diff options
author | KWSys Robot <kwrobot@kitware.com> | 2012-05-02 12:46:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-10-01 18:38:57 (GMT) |
commit | 7d3c2959fa9cb65b3be81bdfe3f69c29d31a9e67 (patch) | |
tree | bce89f47a95d9b29d52c9c8aa2847872fde59a42 /SystemInformation.hxx.in | |
download | CMake-7d3c2959fa9cb65b3be81bdfe3f69c29d31a9e67.zip CMake-7d3c2959fa9cb65b3be81bdfe3f69c29d31a9e67.tar.gz CMake-7d3c2959fa9cb65b3be81bdfe3f69c29d31a9e67.tar.bz2 |
KWSys 2012-05-02 (719638e2)
Extract upstream KWSys using the following shell code.
$ sha1=719638e233b560afb0d9a0afdcf23469dc1827fe &&
git archive --prefix=KWSys-snapshot/ $sha1 |
tar x
Diffstat (limited to 'SystemInformation.hxx.in')
-rw-r--r-- | SystemInformation.hxx.in | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in new file mode 100644 index 0000000..b6ebe6a --- /dev/null +++ b/SystemInformation.hxx.in @@ -0,0 +1,88 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + 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. +============================================================================*/ +#ifndef @KWSYS_NAMESPACE@_SystemInformation_h +#define @KWSYS_NAMESPACE@_SystemInformation_h + + +/* 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 +#include <@KWSYS_NAMESPACE@/stl/string> +#include <stddef.h> /* size_t */ + +namespace @KWSYS_NAMESPACE@ +{ + + +// forward declare the implementation class +class SystemInformationImplementation; + +class @KWSYS_NAMESPACE@_EXPORT SystemInformation +{ + +public: + SystemInformation (); + ~SystemInformation (); + + const char * GetVendorString(); + const char * GetVendorID(); + kwsys_stl::string GetTypeID(); + kwsys_stl::string GetFamilyID(); + kwsys_stl::string GetModelID(); + kwsys_stl::string GetSteppingCode(); + const char * GetExtendedProcessorName(); + const char * GetProcessorSerialNumber(); + int GetProcessorCacheSize(); + unsigned int GetLogicalProcessorsPerPhysical(); + 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. + size_t GetTotalVirtualMemory(); + size_t GetAvailableVirtualMemory(); + size_t GetTotalPhysicalMemory(); + size_t GetAvailablePhysicalMemory(); + + /** Run the different checks */ + void RunCPUCheck(); + void RunOSCheck(); + void RunMemoryCheck(); +private: + SystemInformationImplementation* Implementation; + +}; +} // namespace @KWSYS_NAMESPACE@ + +/* Undefine temporary macros. */ +#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# undef kwsys_stl +# undef kwsys_ios +#endif + +#endif |