1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: SystemInformation.hxx.in,v $
6 Date: $Date: 2008-03-11 21:37:17 $
7 Version: $Revision: 1.8 $
8 Copyright (c) 2005 Insight Consortium. All rights reserved.
9 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
15 =========================================================================*/
16 #ifndef @KWSYS_NAMESPACE@_SystemInformation_h
17 #define @KWSYS_NAMESPACE@_SystemInformation_h
20 /* Define these macros temporarily to keep the code readable. */
21 #if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
22 # define kwsys_stl @KWSYS_NAMESPACE@_stl
23 # define kwsys_ios @KWSYS_NAMESPACE@_ios
25 #include <@KWSYS_NAMESPACE@/stl/string>
27 namespace @KWSYS_NAMESPACE@
31 // forward declare the implementation class
32 class SystemInformationImplementation
;
34 class @KWSYS_NAMESPACE@_EXPORT SystemInformation
39 ~SystemInformation ();
41 const char * GetVendorString();
42 const char * GetVendorID();
43 kwsys_stl::string
GetTypeID();
44 kwsys_stl::string
GetFamilyID();
45 kwsys_stl::string
GetModelID();
46 kwsys_stl::string
GetSteppingCode();
47 const char * GetExtendedProcessorName();
48 const char * GetProcessorSerialNumber();
49 int GetProcessorCacheSize();
50 int GetLogicalProcessorsPerPhysical();
51 float GetProcessorClockFrequency();
52 int GetProcessorAPICID();
53 int GetProcessorCacheXSize(long int);
54 bool DoesCPUSupportFeature(long int);
56 const char * GetOSName();
57 const char * GetHostname();
58 const char * GetOSRelease();
59 const char * GetOSVersion();
60 const char * GetOSPlatform();
64 unsigned int GetNumberOfLogicalCPU(); // per physical cpu
65 unsigned int GetNumberOfPhysicalCPU();
67 bool DoesCPUSupportCPUID();
69 // Retrieve memory information in megabyte.
70 unsigned long GetTotalVirtualMemory();
71 unsigned long GetAvailableVirtualMemory();
72 unsigned long GetTotalPhysicalMemory();
73 unsigned long GetAvailablePhysicalMemory();
75 /** Run the different checks */
78 void RunMemoryCheck();
80 SystemInformationImplementation
* Implementation
;
83 } // namespace @KWSYS_NAMESPACE@
85 /* Undefine temporary macros. */
86 #if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS